Archived topic
Sidebar size looks different in post and pages
25 replies · Started by Sebastian on January 18, 2021
That CSS is correct.
Add it to the Customizer > Additional CSS - at the very top of the code.
Hi David thank you for your answer, that CSS was already added before I ask for help. The problem is that I need to hide the rightside bar on mobile but this code apparently doesn't do that because the sidebar is still appearing on the mobile version of my blog, as you can see in the screenshot.
Is there a possibility to hide the right sidebar on mobile?
Hi Sebastian,
The CSS should work, it's just not showing on your website. I did a simulation using developer tool, as you can see, as soon as the CSS been added the right side bar is gone.
https://www.screencast.com/t/rDn52datf
I would say clear cache, and if it's still not working, please provide login info, we'll have another look :)
Hi Ying thank you for your help. I cleaned the cache and waited until today just in case something change, but the problem remains the same.
In the box you would see the login info.
Thanks again.
Hi there,
i just logged into your site, and I am not seeing that CSS in Customizer > Additional CSS?
Can you make sure the changes were published.
Hi David, I've just checked It is there, here It is a screenshot of the code in Aditional CSS.
I cannot see the CSS you mentioned here:
https://generatepress.com/forums/topic/sidebar-size-looks-different-in-post-and-pages/#post-1643001
That CSS is required to remove the sidebar on mobile.
It's already working David, thank you. The problem that I have now is that the author box also has been hidden. Is there a way to enable the author box on mobile with the right side bar hidden?
The author box is a hook (generate_before_right_sidebar_content) made in elements.
Remove that CSS and use this instead:
@media (max-width: 768px) {
#right-sidebar .widget {
display: none;
}
}
It will remove any Widgets but not the author box.
David it works perfectly! thank you so much for you help. Sorry for the inconvenience.
Glad to be of help!