- This topic has 11 replies, 3 voices, and was last updated 1 year, 10 months ago by Fernando.
-
AuthorPosts
-
October 19, 2022 at 6:03 pm #2379355Vishvendra
This is my web story archive page. The stories appear in list view, plus their cover and stories showing separately.
The blog layout is set 2, but why is this?
Need a little help.
Additionally, I want to display Web Stories in 3 columns (only web story archive.) I’ve tried the solutions mentioned in the support, but they seem to not work.
Thank you very much.
October 19, 2022 at 8:24 pm #2379424Fernando Customer SupportHi Vishvendra,
To clarify, are you referring to the columns on this archive page? By default, the columns setting in the Blog settings in the customizer doesn’t apply to Custom Post types. You’ll need to add a PHP snippet to make it work. Reference: https://docs.generatepress.com/article/using-columns-in-the-blog/#adding-columns-to-your-custom-post-type
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
You’ll need something like this:
add_filter( 'generate_blog_columns', function( $columns ) { if ( 'CPT_SLUG' === get_post_type() && ! is_singular() ) { return true; } return $columns; } ); add_filter( 'generate_blog_get_column_count','tu_search_column_count' ); function tu_search_column_count( $count ) { if ( is_post_type_archive( 'CPT_SLUG' ) ) { return 33; } return $count; }
Replace
CPT_SLUG
with your CPT slug.October 20, 2022 at 12:15 am #2379593VishvendraAdded but still not working. The cover and story appear separate. Though, thanks for the columns.
https://drive.google.com/file/d/1dWWjkFYlB5xjZkVTWxFqg3E-YBsuLydo/view?usp=sharing
October 20, 2022 at 1:00 am #2379647Fernando Customer SupportI see. How should it look like? Can you provide a sketch?
October 20, 2022 at 3:12 am #2379763VishvendraI think web stories on Google for Creators are the perfect example. They don’t autoplay and have a cover that is not separated. See here.
And this is the screenshot. https://drive.google.com/file/d/15K7VBrgqFqQPk0e0E6bhrQl7vaOxOLKI/view?usp=sharing
October 20, 2022 at 4:20 am #2379827DavidStaffCustomer SupportHi there,
do you want to remove the “Cover” image ?
As a note – the Stories are auto playing on my desktop.October 20, 2022 at 4:59 am #2379855VishvendraI guess that would improve the UX. I could do that using display: none;
But do you have something better?
October 20, 2022 at 5:05 am #2379857DavidStaffCustomer SupportYou can use a Layout Element:
https://docs.generatepress.com/article/layout-element-overview/
To disable the Featured Image, just set the Display Rules to that archive
October 20, 2022 at 5:09 am #2379858VishvendraThanks, I almost forgot about this. Let me try this, and if something comes up, I’ll let you guys know. Thanks a lot. When it comes to supporting: You guys are the best – best in the entire WordPress domain.
October 20, 2022 at 6:10 am #2379918DavidStaffCustomer SupportGlad to be of help!
October 26, 2022 at 10:20 pm #2389033VishvendraHi, David. I just tried the layout option, but it’s not working.
October 26, 2022 at 10:33 pm #2389042Fernando Customer SupportCan you try adding this PHP snippet?:
add_filter( 'option_generate_blog_settings', function( $options ) { if ( is_post_type_archive( 'CPT_SLUG' ) ) { $options['post_image'] = false; } return $options; } );
Replace
CPT_SLUG
accordingly. -
AuthorPosts
- You must be logged in to reply to this topic.