Cyber Week Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] More masonry blogs

Home Forums Support More masonry blogs

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #159950
    Jurgen

    Hi There, I have 3 masonry blogs one wordpress default and two cpt blogs. Two works perfect but i cat get the third working. I use the code below. Can you help me out.

    add_filter('generate_blog_masonry','generate_blog_enable_post_type_masonry');
    function generate_blog_enable_post_type_masonry()
    {
    	// Check page template by file name
    	if ( is_page_template('sponsoren-template.php') )
    		return 'true';
    
    	// Check if blog
    	if ( is_home() )
    		return 'true';
    	
            // Otherwise, disable it
    	return 'false';
    }
    
    add_filter('generate_blog_activate_masonry','generate_blog_activate_page_template_masonry');
    function generate_blog_activate_page_template_masonry()
    {
    	// Check page template by file name
    	if ( is_page_template('sponsoren-template.php') )
    		return 'true';
    
    	// Check if blog
    	if ( is_home() )
    		return 'true';
    	
            // Otherwise, enable it
    	return 'false';
    }
    #159980
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Which is the third one?

    The above should enable it for the sponsoren-template.php template and the regular blog, but nothing else.

    #160472
    Jurgen

    Hi Tom,
    The third one is raadsleden-template.php

    So i have wordpress default, sponsoren and raadsleden the first two work fine but i dont know what code i must use in functions.php to activate the third one

    Thanks

    #160634
    Tom
    Lead Developer
    Lead Developer

    You need another is page template call in there:

    if ( is_page_template('raadsleden-template.php') )
    	return 'true';
    #160767
    Jurgen

    Thanks, that works ticket solved!

    #160797
    Tom
    Lead Developer
    Lead Developer
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.