Jump to content
Sign in to follow this  
fedster

Hide sidebar in all pages except blog page

Recommended Posts

fedster    0
fedster

Hi I'd like to use the Default Sidebar in our blog page to show Categories and a few other widgets. However, I'd like no sidebar to appear on any other page. Here's your demo page setup with an empty secondary sidebar on the Highlight page and a proper default sidebar on the blog page - was hoping that by marking "hide if empty" this would do the trick but I still get an area that says

The secondary sidebar has been selected but doesn't have any widgets. Add some widgets to your secondary sidebar in the admin under appearance > widgets.
thank you in advance! f

Share this post


Link to post
Share on other sites
bryan-hadaway    3
bryan-hadaway

Try adding this to your Custom CSS: `.home #sidebar, .page #sidebar{display:none}` If that doesn't fully work, describe the problem further and provide a link to your site. Thanks, Bryan

Share this post


Link to post
Share on other sites
fedster    0
fedster

Bryan thanks for the tip. I added what you told me and now the sidebar is gone from all pages, including the blog. Before, it was showing on all pages. Would love to just hide it from the following pages http://gantto.com/testSite/?page_id=16 http://gantto.com/testSite/?page_id=2 http://gantto.com/testSite/?page_id=8 but keep the main sidebar on this page http://gantto.com/testSite/?page_id=12 thanks! f

Share this post


Link to post
Share on other sites
bryan-hadaway    3
bryan-hadaway

Try this new code: ` .home #sidebar, .page #sidebar{display:none} .page-id-12 #sidebar{display:inline} ` Thanks, Bryan

Share this post


Link to post
Share on other sites
fedster    0
fedster

awesome, that works like a charm! Is there an easy way to figure out the page id, for future reference? thanks again f

Share this post


Link to post
Share on other sites
fedster    0
fedster

ok never mind - that was pretty simple. Case closed... f

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×