Hello,
I’m using the generate_blog_columns filter to add columns to all post type archives and generate_blog_get_column_count to customize. This is working correctly.
add_filter( 'generate_blog_columns', function( $columns ) {
if ( get_post_type() && ! is_singular() ) {
return true;
}
return $columns;
} );
add_filter( 'generate_blog_get_column_count', function( $columns ) {
if ( 'classified' === get_post_type() && ! is_singular() ) {
return 50;
}
if ( 'event' === get_post_type() && ! is_singular() ) {
return 0;
}
return $columns;
} );
The issue is when I have a Query Loop block in the sidebar the column layout is also applied there.
The issue is also only present on the archive pages that are using a GP sidebar layout element.
The homepage is using the default WP widget layout and the issue is not present.
I thought perhaps excluding the gp_elements post type in the filter above would fix the issue but it does not.
Hoping you guys have some suggestions! Thank you
GeneratePress: 3.1.3
GP Premium: 2.1.2
GenerateBlocks: 1.6.0-rc1
GenerateBlocks Pro: 1.4.0-rc1