Archived topic
Masonry Broken on Tag Archive Page
3 replies · Started by Markus on October 25, 2018
Howdy,
on search pages like https://insoguide.de/?s=insolvenzberatung and category pages like https://insoguide.de/standorte masonry works fine.
Only on tag pages like https://insoguide.de/thema/eigenverwaltung the layout is totally broken.
(I use tag and category for pages and posts).
What's wrong?
Hi there,
This is happening because you have pages displaying within the results.
Try adding these functions:
add_filter( 'generate_blog_masonry', function( $default ) {
if ( is_tag() && 'page' === get_post_type() ) {
return 'true';
}
return $default;
} );
add_filter( 'generate_blog_columns', function( $default ) {
if ( is_tag() && 'page' === get_post_type() ) {
return true;
}
return $default;
} );
Tom,
great and fast support.
Your solution works fine.
Thank you!
You're welcome :)