Archived topic
Sidebar Fix
16 replies · Started by Matt Stern on February 8, 2022
Hi there,
When looking at the sidebar on this page: https://4sternstaging.com/category/movies/
The "Top Stories" post titles are squished leaving whitespace on the right.
On a single post: https://4sternstaging.com/2021/11/05/as-eternals-lands-in-theatres-marvel-explains-who-they-are/
The same sidebar looks right. Any ideas what's going on here. I couldn't figure it out double checking the settings and the inspector.
Here's a screenshot just for reference: https://nimb.ws/g1NRqu
Thanks kindly,
Matt
Hi there,
These custom classes are causing the issue:
https://www.screencast.com/t/oU7wFiC6Qgun
They don't exist in single posts:
https://www.screencast.com/t/L2PXG6lzJ
Thanks for taking a look, Leo. Pretty weird. Anyway, I replaced that widget with WP Show Posts and it looks good now.
No problem :)
Hi Guys, this issue seems to have returned.
See correct sidebar on this page: https://insidepulse.com/2014/08/26/rob-vam-dam-ending-wwe-run-tonight-announced-for-main-event-tonight/
Then the incorrect sidebar on this archive page: https://insidepulse.com/zone/games/
I'm using a query loop block to show the "Top Stories"
Any ideas why the archive page is showing in two columns?
Thanks!
Matt
There are some classes that are not supposed to be there in the archive page again:
https://www.screencast.com/t/j3of5w8ChZC
Thanks, Leo. Any ideas on how those classes might have gotten there? I don't have any css or snippet related to that – at least that I know of!
Hi Matt,
Can you make sure you are using the latest GB?
I recall there was a bug, but I think it's been fixed already.
Let me know!
Hi Ying,
Yes, everything is up to date!
Can you start a staging site and provide the login info for us to take a look?
Thanks :)
Hi Leo,
So I tried creating a staging site with just the database, themes and plugins, and for some reason, the zone taxonomies and subsequent archive pages didn't transfer over properly, so I'm not sure if you can troubleshoot it there.
If you'd like, you're welcome to poke around the live site a bit, maybe don't make any changes without running it by me? Thanks!
Login info below for both live and staging.
Try selecting the Post template block and set its flex basis to 100%.
Let me know!
Do you mean this Element? https://insidepulse.com/wp-admin/post.php?post=5255296&action=edit
If so, I'm not sure where the flex basis is set, unless you mean with css?
Ahh, I see where you meant now. :)
So that did help alot! There are still some minor differences between the archive: https://insidepulse.com/zone/games/
and a single post: https://insidepulse.com/2022/11/28/how-dedicated-gaming-servers-can-improve-your-gaming-experience/
Namely the spacing above and below each link in the query loop, and the kind-of messed up left padding/margin.
Any ideas on these?
Thanks!
Hi Matt,
Can you try adding this PHP snippet:
add_filter( 'post_class', function( $classes ) {
if ( is_archive() && 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
This should remove the class "generate-columns" from Query Loop Blocks in archive pages which is adding the default spacing.
Let us know how it goes.