- This topic has 7 replies, 2 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
January 8, 2023 at 11:51 pm #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.
January 8, 2023 at 11:56 pm #2488476Fernando 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.
January 9, 2023 at 5:03 pm #2489519Cathryn
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!!January 9, 2023 at 5:35 pm #2489529Fernando 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
January 9, 2023 at 7:01 pm #2489552Cathryn
OK, information provided.
January 9, 2023 at 8:23 pm #2489592Fernando Customer Support
I modified the code above. Can you try updating the code you have with that?
January 9, 2023 at 9:05 pm #2489604Cathryn
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!
January 9, 2023 at 9:17 pm #2489608Fernando Customer Support
You’re welcome, Cathryn!
-
AuthorPosts
- You must be logged in to reply to this topic.