Site logo

[Support request] Two columns on Category pages

Home Forums Support [Support request] Two columns on Category pages

Home Forums Support Two columns on Category pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2520997
    Bohdan

    Hello!
    I added taxonomies (categories, tags) to my Pages. I show Pages (not Posts) on Category pages. I want to show Pages in two columns. But GP settings allow me to set only Posts in two columns. How to set the same styles for Pages as for Posts (on Category pages).
    This is one of my Category pages: https://merkator.org.ua/category/8-klas/
    I need this: https://testy.org.ua/category/astronomija/
    Thanks)

    #2521320
    David
    Staff
    Customer Support

    Hi there,

    add this PHP Snippet to your site:

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

    This doc explains adding PHP: https://docs.generatepress.com/article/adding-php/

    #2521485
    Bohdan

    Everything works great. Thank you very much!!!

    #2521902
    David
    Staff
    Customer Support

    Glad to hear that!

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