Archived

This topic is now archived and is closed to further replies.

  • 0

Hide sidebar in all pages except blog page

Question

Posted · Report post

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

5 answers to this question

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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

Posted · Report post

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

Share this post


Link to post
Share on other sites