Site logo

Archived topic

GPP 2.0 beta - category archive

1 reply · Started by Mark on March 26, 2021

Viewing posts 1–2 of 2

I have successfully created two category archives with GPP 2.0 beta on my localhost. They look different from each other because I did them as Elements > Blocks. Thank you Leo for your videos.

The problem I'm having is I want my Gallery category to be two columns, and my Photo Editing category to be one column (just a list). But, both archives are controlled be the Layout > Blog settings. Is there a way to 'detach' them from the blog settings? Even just one of them?

Hi Mark,

Glad to hear that the videos are useful :)

I believe this PHP snippet is what you are after:

add_filter( 'generate_blog_columns', function( $columns ) {
    if ( is_category( 'photo-editing' ) ) {
        return false;
    }

    return $columns;
} );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know if this helps :)

This archived topic is closed to new replies.