Site logo

Archived topic

Side Bars not working?

6 replies · Started by troyw on November 1, 2022

Viewing posts 1–7 of 7

Hey team,

Not quite sure what is happening, but the left sidebar is not appearing in the Blog Post Pages as it should? The Left Sidebar is appearing at the bottom of the post instead. If I look in the Widget editor I get a heap of errors like this;
The "lsi_widget" block was affected by errors and may not function properly. Check the developer tools for more details.

The "text" block was affected by errors and may not function properly. Check the developer tools for more details.

The "archives" block was affected by errors and may not function properly. Check the developer tools for more details.

The "text" block was affected by errors and may not function properly. Check the developer tools for more details.

The "categories" block was affected by errors and may not function properly. Check the developer tools for more details.

I'm fairly sure this is something to do with it and I also note that the url has this at the end; #more-18239

Any ideas what is causing this please?
Thanks

Sorry,
I have identified the issue, but need to know how I can adjust the CSS to ignore the blogs.
So here is the custom CSS causing the problem;

#content{
 display: block;
}

What this code does, is fix a bug in WP Travel Plugin, where the image does not size correctly on their holiday page. The unintentional consequence of this however, is that the Left Sidebar is put to the bottom of Blog posts.
Is there a way by adapting this css, that I can stop this happening or target only WP Travel and not everything else?

Thanks

Hi Troyw,

Yes, there's a way. The default display of the content is flex - displayed in rows on desktop. The CSS you have is turning it to display: block.

The link you provided is for a Single Post page. To clarify, are you wanting to exclude that code there? If so, alter that CSS you have to this:

body:not(.single-post) div#content {
    display: block;
}

Thats awesome Fernando, thanks.
Can I be a bit cheeky and ask how I can also stop it from affecting the Travel Archive Page.
I adapted your css, but it doesn't seem to work. I've tried a few selectors, but none seem to get it?

body:not(.wp-travel-archive-content) div#content {
    display: block;

}

The link is below and as you can see, the css breaks the footer section?
Thanks

Can you try this?

body:not(.post-type-archive-itineraries, .single-post) div#content {
    display: block;
}

All fixed, thanks Fernando.

You're welcome Troyw!

This archived topic is closed to new replies.