WordPress.org

Support

Support » How-To and Troubleshooting » How To Disable Sidebar In post not on page

How To Disable Sidebar In post not on page

  • decentguy49

    @decentguy49

    Hello,

    I had used a theme in past which allows you to disable sidebar on a post by selecting full wide option on Add new Post page, now on my theme i want to add same option can you plz guide me how to do it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Simple.
    Open your theme’s single.php file into a text editor (NotePad++, DreamWeaver, FrontPage etc.) and find the following code at the bottom of the page:
    <?php get_sidebar(); ?>

    This code is loading the sidebar in your post pages.
    You can either comment it out like:
    <?php //get_sidebar(); ?>

    or, you can just delete the code to achieve the goal. 🙂

    (After resolving the problem, don’t forget to click on the “The Problem is Resolved” on the right)

    IF it is not an option in your theme, you will have to create a custom Page Template, create some CSS for it, and apply the Page Template to the page.
    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How To Disable Sidebar In post not on page’ is closed to new replies.
Skip to toolbar