WordPress.org

Ready to get started?Download WordPress

Forums

Remove SideBar In Certain Pages (7 posts)

  1. tculley
    Member
    Posted 4 years ago #

    Hey all,

    Was wondering if there was a way to remove my sidebar in certain pages of my site. I'm using the Black Lucas Theme incase you need to know that.

    Help is greatly appreciated!

  2. jrav001
    Member
    Posted 4 years ago #

    You are looking for information on Conditional Tags:
    http://codex.wordpress.org/Conditional_Tags

    Scroll down near the bottom to "Variable Sidebar Content".

  3. 8persap
    Member
    Posted 4 years ago #

    I have the same problem as @tculley. Been going around in circles.

    The Conditional Tags 'Variable Sidebar Content' functionality is great if you need to display different sidebar content on different pages. But what I am trying to do is remove the sidebar completely on certain pages.

    The most frustrating thing is I have done this before, but in my excitement it seems I did not bookmark the tutorial I followed.

    The solution I used before was really simple and went something like this - The tutorial provided some code to be pasted into one of the .php files (can't remember which one). It then told me to create a new page template, without a sidebar, and upload to WP. Now when I went into edit any of the pages there was an additional menu on the right hand side that would allow me to assign the new, non-sidebar template to the page.

    It was the perfect solution, but I cant for the life of me find the tutorial I followed.

    Does anyone know of the colouration I'm talking about? If so, pleeese let me know.

    Thanks.

  4. 8persap
    Member
    Posted 4 years ago #

    Found it!

    What I used last time was WordPress Custom Page Template functionality.

    It's so simple. You literally need to duplicate your page.php template file and rename it (or create a new one with the look you what, just make sure the file name is not page.php). In the new file you add a couple of lines of php and remove the elements you don't want to see, then upload that file to your theme folder. Now when you can go to create or edit a page, you'll see a new drop down menu on the right hand side called 'Page Template'. Just pick the new template and that's what will be displayed on that page. Magic.

    Here's a couple of very easy to follow tutorials :

    http://www.maheshchari.com/wordpress-custom-page-template/

    http://www.davidrisley.com/2009/01/20/how-to-custom-page-template-wordpress/

    Hope this helps.

  5. glennon
    Member
    Posted 4 years ago #

    Thanks 8persap,
    I got rid of the sidebar (mostly) but there's still the outline of the dull gray color there. I'm guessing that I have to alter the style.css but not sure what to change. Does anyone have any suggestions? I'm using the default Kubrick theme on WP 2.9.2. Any help is greatly appreciated.
    http://www.homebusinessceo.com
    Gerard

  6. Jontan
    Member
    Posted 4 years ago #

    I believe this will be the site you are seeking for

    http://educhalk.org/blog/tag/wp-themes/

  7. vishalkhialani
    Member
    Posted 4 years ago #

    Hi Guys,
    I am using thesis theme and I want to do the same for a post instead of a page.

    so I got ma self a plugin where I can use custom templates for posts its called Single Post Template and now I am confused as thesis uses its own template so should I go and copy the that one ?

    Hope u guys can help me out here.

    Cheers,
    Vishal

Topic Closed

This topic has been closed to new replies.

About this Topic