- This topic has 11 replies, 2 voices, and was last updated 4 months, 2 weeks ago by
Tom.
-
AuthorPosts
-
October 6, 2020 at 1:41 pm #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!
October 6, 2020 at 1:44 pm #1475260Tom
Lead DeveloperLead DeveloperHi 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; } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 6, 2020 at 1:53 pm #1475272Thomas
Thanks, still not working though =/
October 6, 2020 at 1:57 pm #1475282Thomas
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?
October 6, 2020 at 1:57 pm #1475284Tom
Lead DeveloperLead DeveloperAh, 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%; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 6, 2020 at 2:06 pm #1475301Thomas
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?
October 6, 2020 at 4:02 pm #1475443Tom
Lead DeveloperLead DeveloperIt 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 π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 6, 2020 at 4:15 pm #1475458Tom
Lead DeveloperLead DeveloperJust an update here – looks like we’ll have this fixed in 1.12.2 π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 8, 2020 at 2:28 am #1478062Thomas
Cool, thanks a lot!
I love your support, it’s really great.October 8, 2020 at 2:30 pm #1479255Tom
Lead DeveloperLead DeveloperWe just released 1.12.2 which should fix this.
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 9, 2020 at 1:29 am #1479795Thomas
Yeah, works as expected now, thanks a lot!
October 9, 2020 at 8:57 am #1480663Tom
Lead DeveloperLead DeveloperAwesome – thanks for reporting the issue! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.