WordPress.org

Support

Support » Themes and Templates » How to load page without sidebar?

How to load page without sidebar?

  • I use the sidebar on most of my site (http://blog.ronronmx.com), but I would like to create some pages and posts without the sidebar. How do I achieve this?

    Thank you for this great theme and I hope someone will be able to help.

    SR

Viewing 3 replies - 1 through 3 (of 3 total)
  • You will need a bit of php to exclude the sidebar include on the specific posts and pages. Since this is going to be done manually you will need to add the post/page ID’s manually every time you want to do so.

    Replace the numbers with your post and page IDs that you want excluded.

    <? if ((is_page(2,5,8)) || (is_post(4,2,9)) { ?>
    show whatever you want here
    <? }
    else {
    get_sidebar();
    }
    ?>


    Erum Munir
    Custom WordPress Themes

    for pages just select the “page without sidebar” template when editing a post.

    for posts, you need to do what Erum wrote, but also do that in the header.php file for the “with-sidebar” class

    Hi digitalnature, Did you mean to say “for pages just select the !page without sidebar! template when editing a” page? Or did you really mean when editing a post?

    I am very new to WP and would also like to use pages without the sidebar.

    I do not appear to have a template called “page without sidebar”. I am using Flexibility 2. Where do I find this template? Is it part of standard WP or do I need a plugin? Thanks for any help with this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to load page without sidebar?’ is closed to new replies.
Skip to toolbar