I’m enjoying this theme quite a bit, thank you for your work on it and for sharing it.
Is there a way to disable the sidebar for certain pages? I am using the simple press forums and would like to disable the sidebar when displaying the forums.
Thanks for your time.AdvertismentDaniel TaraKeymaster
There is no native way of disabling the sidebar, however you could manually edit the theme not to display the sidebar on certain pages.
e.g. Open page.php and replace [code]<?php get_sidebar(); ?>[/code] with [code]<?php if (!is_page(‘forum’)) get_sidebar(); ?>[/code].
This will not load the sidebar for the page called forum.
You could also display a page ID or an array of pages instead of the name. This also works for is_single(), is_front_page() and others. Here’s a [url=http://codex.wordpress.org/Conditional_Tags]full list of conditionals[/url].
You may also want to increase the content width for consistency.JonCParticipant
Hi Daniel, thanks for your response. I did do a bit more searching on other sites and I tried the if statement with no success originally, but that was with single.php so now I know why it didn’t work! Must be some kind of brain lock to edit the wrong file. I will try this out again and also look into the page ID thing you mentioned.
Thank you very much for your response!
You must be logged in to reply to this topic.