Jump to content


Photo
- - - - -

Hide sidebar in all pages except blog page


This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1 fedster

fedster

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 05 August 2010 - 12:28 AM

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.

Please Login or Register to see this Hidden Content

'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

#2 bryan-hadaway

bryan-hadaway

    Advocate

  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 05 August 2010 - 12:43 AM

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

#3 fedster

fedster

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 05 August 2010 - 12:57 AM

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

Please Login or Register to see this Hidden Content

Please Login or Register to see this Hidden Content

Please Login or Register to see this Hidden Content

but keep the main sidebar on this page

Please Login or Register to see this Hidden Content

thanks! f

#4 bryan-hadaway

bryan-hadaway

    Advocate

  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 05 August 2010 - 01:21 AM

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

#5 fedster

fedster

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 05 August 2010 - 03:37 AM

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

#6 fedster

fedster

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 05 August 2010 - 03:39 AM

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