How to load page without sidebar? (4 posts)

  1. ronronmx
    Posted 6 years ago #

    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.


  2. Erum
    Posted 6 years ago #

    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 {

    Erum Munir
    Custom WordPress Themes

  3. digitalnature
    Posted 6 years ago #

    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

  4. Fizzytop
    Posted 6 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic