[Resolved] Web Stories edit

Home Forums Support [Resolved] Web Stories edit

Home Forums Support Web Stories edit

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1605340
    Oscar

    Hi, i am using Web Stories plugin
    I was looking at the forum and I see that usually the plugin generates a page to display the stories, however, in my case created in an archive page. This to some extent limits me to be able to add or remove elements.
    The stories are show in archive page https://dietadelhuevo.com/web-stories/
    I have tried with CSS to show the stories one by one in columns of 3, however I cannot do it.
    Could you help me by indicating which are the classes that I should modify in order to put the stories in 3 columns?

    Thanks a lot!

    #1605578
    David
    Staff
    Customer Support

    Hi there,

    you can try adding this PHP Snippet to your site so that archive uses the Blog Columns ( which you can set in Customizer > Layout > Blog ):

    add_filter( 'generate_blog_columns', function( $columns ) {
        if ( ! is_singular() && 'web-story' === get_post_type() && ! is_post_type_archive( 'web-story' ) ) {
            $columns = true;
        }
    
        return $columns;
    } );

    How to add PHP: https://docs.generatepress.com/article/adding-php/

    #1608127
    Oscar

    Hello David, thanks for you response.

    I added the snippet to my child theme, however I can’t show the stories in columns. In small screens I have no problem showing in one column. In the desktop version is where I need to display in 3 columns.

    I try to do this in Customizer > Layout > Blog > Archives > Columns

    #1608145
    David
    Staff
    Customer Support

    I made some changes, can you try the updated snippet above:

    https://generatepress.com/forums/topic/web-stories-edit/#post-1605578

    The Blog Columns should automatically stack on Mobile. If you can add the code and let me know.

    #1608571
    Oscar

    I added the updated code. I still can’t place the stories in 3 columns.
    These are some screenshots from the control panel

    https://prnt.sc/whtctw
    https://prnt.sc/whtdkc

    #1608649
    Leo
    Staff
    Customer Support

    Can you try adding this as well?

    add_filter( 'generate_blog_get_column_count', function( $column_width ) {
        if ( ! is_singular() && 'web-story' === get_post_type() && ! is_post_type_archive( 'web-story' ) ) {
            return '33';
        }
    
        return $column_width;
    } );
    #1608676
    Oscar

    Hi Leo, there are no change even adding the code you give me.
    Are you taking into account that this is not a page, nor an entry but an archive?

    The screenshots I sent are still the same scenario I have in the customizer control panel.

    #1609088
    David
    Staff
    Customer Support

    Try removing this last condition from both snippets provided:

    && ! is_post_type_archive( 'web-story' )

    #1609638
    Oscar

    Yeah!!! Now is work perfectly!

    Thanks a lot David and Leo! You are the best!

    Have a nice day.

    Thanks for yoy support.

    #1609734
    David
    Staff
    Customer Support

    Glad we could be of help.

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