Site logo

[Support request] category page sidebar has 3 columns, should be a single column

Home Forums Support [Support request] category page sidebar has 3 columns, should be a single column

Home Forums Support category page sidebar has 3 columns, should be a single column

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2488475
    Cathryn

    Hi,
    Between the customizer and the Elements areas, I’ve been going back and forth trying to set my blog pages like so:

    General blog page — just content (no sidebar) with masonry excerpts, 3 columns. [WORKS FINE]

    Single post page — content, right sidebar (with 2 widgets – recent posts & categories) [WORKS FINE]

    Category page — content, right sidebar, same as above. [THIS IS WONKY]

    What’s happening is the category sidebar has 3 columns! Please see here: https://www.ace4safetrails.org/category/agencies/

    Sorry, but it’s really confusing going between the 2 areas – customizer and elements to adjust things… Can you please shed some light on this?

    thank you.

    #2488476
    Fernando
    Customer Support

    Hi Cathryn,

    The Query Loop Block isn’t intended to appear on archive pages – thus, the issue. Try adding this snippet:

    add_filter( 'post_class', function( $classes ) {
    	if ( ! is_admin() && in_array( 'gb-query-loop-item', $classes ) ) {
    		$index = array_search('generate-columns',$classes);
    if($index !== FALSE){
        unset($classes[$index]);
    }
    		
    	}
    
    	return $classes;
    } );

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

    It should fix the issue.

    Let us know how it goes.

    #2489519
    Cathryn

    Sorry, Fernando, I added the snippet, it’s been activated but there’s no change:
    https://www.ace4safetrails.org/category/agencies/
    Thanks again for your help!!

    #2489529
    Fernando
    Customer Support

    I see. Can you provide admin login credentials? I’ll take a closer look.

    Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2489552
    Cathryn

    OK, information provided.

    #2489592
    Fernando
    Customer Support

    I modified the code above. Can you try updating the code you have with that?

    #2489604
    Cathryn

    Thank you, this worked. I understand that normally, the archive pages wouldn’t pull in the ‘recent posts’, but we’re just getting started so the pages are rather empty and this looks very nice for now.

    I appreciate your help!

    #2489608
    Fernando
    Customer Support

    You’re welcome, Cathryn!

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