Site logo

Archived topic

Different Layout for Category Page

7 replies · Started by Dushan on February 12, 2018

Viewing posts 1–8 of 8

What would be the easiest way to have different layout settings for category pages from the homepage? Currently I am trying to replicate it with WP Show Posts, but I would prefer to have simply different archive-settings.

Hi there,

What layout settings are you referring to?

We can likely use some filters.

Let me know :)

Especially: Sidebar vs. No Sidebar.

Also: Number of Columns.

I would like to have a sidebar on the homepage presenting stuff the site has to offer – but the category page should have nothing but posts from the category.

Both settings are possible via customizer – but only for both homepage and archive page – I would like to set them separately.

On a similar note: In my opinion GP has the potential to be a strong yet slick magazine theme. What it would need first, IMHO, is a (cleaner) integration of WP Show Posts and sections, plus as mentioned the possibility to give category-pages their own layout separate from the homepage.

Awesome, thank you!

Followup question, if I may: Is there a way to enable/disable infinite scroll in the same way?

A bit more complicated.

Try this snippet:

add_filter( 'option_generate_blog_settings', 'lh_disable_category_infinite_scroll' );
function lh_disable_category_infinite_scroll( $options ) {
    if ( is_category() ) {
        $options['infinite_scroll'] = false;
    }
    return $options;
}

Perfect, thank you! These options are great and IMHO should be in the customizer.

No problem :)

It really hasn't been requested a lot which is why we have filters for people that want them.

This archived topic is closed to new replies.