[Resolved] Masonry on custom post type broken with 3.0.0

Home Forums Support [Resolved] Masonry on custom post type broken with 3.0.0

Home Forums Support Masonry on custom post type broken with 3.0.0

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1475254
    Thomas

    Hi there,
    we used the masonry option on a custom post type page. It worked fine until the 3.0.0 version.
    Heres the code we have been using:

    function kupf_portfolio_masonry( $masonry ) {
        if ( is_singular( 'zeitungsausgabe' ) ) {
    		return 'true';
        }
        return $masonry;
    }
    add_filter( 'generate_blog_masonry','kupf_portfolio_masonry' );

    Here is an example page where the boxes on the right side should use the masonry layout: https://kupf.at/zeitung/175/
    All help appreciated!

    PS: Love the new 3.0 Update!

    #1475260
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Strange, looks like a possible bug in GPP 1.12.1.

    Can you try adding this as well?:

    add_filter( 'generate_blog_columns', function( $columns ) {
        if ( is_singular( 'zeitungsausgabe' ) ) {
            return true;
        }
    
        return $columns;
    } );
    #1475272
    Thomas

    Thanks, still not working though =/

    #1475282
    Thomas

    I suppose it should load the columns.css from the gp premium directory?
    Seems like its not doing this.

    We have the columns option in the customizer deactived (because we don’t want them in the blog). Maybe the hook is not working if the setting is off?

    #1475284
    Tom
    Lead Developer
    Lead Developer

    Ah, you’re using masonry on your single posts, interesting. Typically I would suggest a custom solution for that, as the built-in option is specifically built for archives.

    However, you can try adding the column CSS yourself:

    .grid-33 {
        width: 33.3333%;
    }
    #1475301
    Thomas

    Well, not exactly: Its the single of a custom post type (left column, “zeitungsausgabe” or magazin) which lists all entries of another related custom post type (right columns, “zeitungsartikel” or magazin-articles).

    Yeah, copying the css would work (I use more than the 33 grid style, additionally I need the different mobile versions too).

    I still would prefer if we could fix it in the core =). It was working perfectly fine for the last two years. Any chance for that?

    #1475443
    Tom
    Lead Developer
    Lead Developer

    It will take some testing to fix this which likely won’t happen until a feature release. The blog columns are built to work on archives, so they’re disabled on single posts (regardless of post type) by default.

    I’ll play with it for 1.12.2 – if we can figure out a solid way to fix it, or a solid way to enable it via filter, we will πŸ™‚

    #1475458
    Tom
    Lead Developer
    Lead Developer

    Just an update here – looks like we’ll have this fixed in 1.12.2 πŸ™‚

    #1478062
    Thomas

    Cool, thanks a lot!
    I love your support, it’s really great.

    #1479255
    Tom
    Lead Developer
    Lead Developer

    We just released 1.12.2 which should fix this.

    Let me know πŸ™‚

    #1479795
    Thomas

    Yeah, works as expected now, thanks a lot!

    #1480663
    Tom
    Lead Developer
    Lead Developer

    Awesome – thanks for reporting the issue! πŸ™‚

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