[Resolved] More masonry blogs

Home Forums Support [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

    You’re welcome 🙂

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