Archived topic
More masonry blogs
5 replies · Started by Jurgen on December 14, 2015
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';
}
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.
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
You need another is page template call in there:
if ( is_page_template('raadsleden-template.php') )
return 'true';
Thanks, that works ticket solved!
You're welcome :)
