[Support request] Web Story Archive Cover and Story are Splinted

Home Forums Support [Support request] Web Story Archive Cover and Story are Splinted

Home Forums Support Web Story Archive Cover and Story are Splinted

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2379355
    Vishvendra

    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.

    #2379424
    Fernando
    Customer Support

    Hi 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.

    #2379593
    Vishvendra

    Added 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

    #2379647
    Fernando
    Customer Support

    I see. How should it look like? Can you provide a sketch?

    #2379763
    Vishvendra

    I 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

    #2379827
    David
    Staff
    Customer Support

    Hi there,

    do you want to remove the “Cover” image ?
    As a note – the Stories are auto playing on my desktop.

    #2379855
    Vishvendra

    I guess that would improve the UX. I could do that using display: none;

    But do you have something better?

    #2379857
    David
    Staff
    Customer Support

    You 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

    #2379858
    Vishvendra

    Thanks, 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.

    #2379918
    David
    Staff
    Customer Support

    Glad to be of help!

    #2389033
    Vishvendra

    Hi, David. I just tried the layout option, but it’s not working.

    #2389042
    Fernando
    Customer Support

    Can 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.

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