[Resolved] How to do single column on blog page but multiple columns on category archives?

Home Forums Support [Resolved] How to do single column on blog page but multiple columns on category archives?

Home Forums Support How to do single column on blog page but multiple columns on category archives?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2572506
    Halil

    hi,
    My homepage is my blog where I use single column post list.

    However I’d like to create a category archives with multiple columns.

    I tried using query templates but I failed.

    How can I achieve this?

    I’ve added pics on private area.

    thanks a lot

    #2572648
    Leo
    Staff
    Customer Support

    Hi there,

    We would need to use a filter as seen in the example here:
    https://docs.generatepress.com/article/using-columns-in-the-blog/

    Is the blog page also your front page?

    Let me know 🙂

    #2572806
    Halil

    yes Leo, blog page is the frontpage

    #2573115
    Halil

    I somehow solved this thru loop template leo, thanks.

    #2573235
    Leo
    Staff
    Customer Support

    Glad to hear that you’ve found a solution.

    Just FYI you don’t actually need the loop template with Query loop for this.

    If the columns option is activated in the customizer, you can just use this snippet to turn it off on the blog/front page:

    add_filter( 'generate_blog_columns', function( $columns ) {
        if ( is_front_page() && is_home() ) {
            return false;
        }
    
        return $columns;
    } );

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

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