Archived topic
The Content Template 3 Column Not Workinh in Archives
5 replies · Started by Chandan Prasad Sahoo on September 30, 2022
I created a content template in Elements and it's working fine for the home page. I also changed the Display posts in columns to 3 for archives but it's not working. Please check the link below.
https://usastorytime.com/web-stories/
Hi there,
Is this a CPT archive?
If so, the customizer option can not control it.
You'll need to add this filter to make it work:
https://docs.generatepress.com/article/using-columns-in-the-blog/#adding-columns-to-your-custom-post-type
This is the Google web stories archive. I added this. But nothing changed.
add_filter( 'generate_blog_columns', function( $columns ) {
if ( 'web-stories' === get_post_type() && ! is_singular() ) {
return true;
}
return $columns;
} );
Is your CPT slug web-story or web-stories?
Can you make sure it's correct?
Thanks a lot. It was my mistake. That slug is web-story.
No worries!
Glad it works now :)