Disable the sidebar on posts (not from the homepage)
-
I want the sidebar to be automatically hidden on posts
I have tested this CSS (.sidebar {
float: right;
padding: 50px 0 50px 3.75%;
width: 28,5%;
display: none;
}
but it doesn’t work ; it only hide the widget but the sidebar is still therethanks
The blog I need help with is: (visible only to logged in users)
-
Howdy humancapitaliser!
Try this out!
.sidebar { float: 0; padding: 0; width: 0; }If that doesn’t work, could you also try:
.sidebar { float: 0; padding: 0; width: 0; } .sidebar #home{ float: right; padding: 50px 0 50px 3.75%; width: 28.5%; } -
After more testing, this should be the code that works:
.sidebar { float: 0; padding: 0; width: 0; } .home .sidebar{ float: right; padding: 50px 0 50px 3.75%; width: 28.5%; } -
Hello
thanks for your help
unfortunately, it doesn’t work :(
the slidebar remains as is on the homepage (which is good) but on the post page, the effect of the new CSS only pushes the widgets onto the right. my theme is rowling if it can help
-
Oh I see what you mean now!
Worked on it more and I think this could work. It’s long so let’s hope it works lol
.sidebar { float: right; padding: 50px 0 50px 3.75%; width: 28.5%; display: none; } .wrapper::after { background: #FFFFFF; border-left: 0; } .content::before { position: relative; } .content { width: 100%; } .home .sidebar{ float: right; padding: 50px 0 50px 3.75%; width: 28.5%; }
- The topic ‘Disable the sidebar on posts (not from the homepage)’ is closed to new replies.