[Resolved] Masonry Broken on Tag Archive Page

Home Forums Support [Resolved] Masonry Broken on Tag Archive Page

Home Forums Support Masonry Broken on Tag Archive Page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #710404
    Markus

    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?

    #710599
    Tom
    Lead Developer
    Lead Developer

    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;
    } );
    #713308
    Markus

    Tom,

    great and fast support.
    Your solution works fine.

    Thank you!

    #713568
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

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