Jump to content
Sign in to follow this  
LukeB

Preventing a sidebar showing up on other pages

Recommended Posts

LukeB

Hi im looking to prevent my content sidebar from showing up on any pages other than the homepage. Under template setup the content sidebar is enabled in the posts page content area. Im currently using the following code to prevent the sidebars content showing up, but it would be much easier if i could just prevent the entire sidebar and not just individual content. body.page .tabberlive.style1{display:none} body.single .tabberlive.style1{display:none} body.archive .tabberlive.style1{display: none;} body.search-results .tabberlive.style1{display:none;} body.page #myGallery {display:none} body.single #myGallery {display:none} body.archive #myGallery {display: none;} body.search-results #myGallery {display:none;} Any assitance would be appreciated http://www.danceyrselfclean.com/ Regards Luke

Share this post


Link to post
Share on other sites
Jenny
Hi Luke. You can disable the content sidebar on any page you wish. Just visit the page and check the box on the right hand side in "PageLines Section Control" to disable the sidebar.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
LukeB
Thanks for the reply but is there a way to disable it on category pages as most of mine are categories.

Share this post


Link to post
Share on other sites
catrina
It's possible to use CSS to hide them on category pages. [code]body.archive.category #myGallery {display:none;}[/code]

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
LukeB
After using the CSS im still getting a small white space about a cm or 2 in height where the sidebar would normally be. Is there a way to completely get rid of this white space on the other pages where i dont want to sidebar

Share this post


Link to post
Share on other sites
Rob
Do you have the "Hide Sidebars when empty" option checked? It's located in the PlatformPro Settings > Sidebar Options.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
LukeB
Yeah thats all checked. If you look at one of the category pages like New you can see a white space where the sidebar would be but ive just prevented the content from showing up in these pages.

Share this post


Link to post
Share on other sites
kastelic
You can also try the plugin Widget Logic which will can hide any widget on any page or type of page using wordpress conditionals: http://codex.wordpress.org/Conditional_Tags

Share this post


Link to post
Share on other sites
LukeB
Im not sure that would work as ive already hidden the widgets with CSS, i just need to hide the sidebar itself to get rid of that horrible white space at the top of my pages where its been hidden

Share this post


Link to post
Share on other sites
Kate
Hmmm... not sure I'm seeing the issue with the white space. [i]But[/i], you can use code similar to this to hide the sidebar: [code]#sidebar2{display:none;}[/code]

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  

×