WordPress.org

Support

Support » Themes and Templates » Deleting the sidebar

Deleting the sidebar

  • Hello everyone,

    I am using the default theme fo WordPress. I’m interested in deleting the sidebar in it’s entirety. Can someone please explain to everything I shoulda delete? I am ‘hacking’ this theme into a photoblog theme, and I want the photos to use up the entire width of the theme.

    Sincerely,
    Jordan

Viewing 9 replies - 1 through 9 (of 9 total)
  • go through all your files like index.php, single.php, archives.php, categories.php, and any custom templates you have made, and look for <?php get_sidebar(); ?>. delete that line.

    i tried this, it does not show the sidebar anymore, but there is a space left available for it. is there any way to remove the space?

    yeah, you need to resize, in your css, the other elements to compensate for the new space.

    difficult to say exactly without a link to your site, but i’d guess you want to increase the width of your page/content ids.

    i see, i edited it in my css and it worked 😀 thank you kindly, not sure if the original poster fixed it yet.

    http://jordanmeeter.com/ – I can’t seem to get the CSS right. everything seems out of place!

    Anyone?

    I tried the suggestions as I am having a similar problem. Expanding the size of the div for the content on a page takes up that extra space left from the missing sidebar, but for me the problem is that is changes all the pages that way. I have a few custom pages that I want the sidebar gone from. How do I target the div for content on just the custom pages that I made?

    OKPeery

    My suggestion would be if you want ONE specific page to operate in ONE specific way, that you assign a class to the unique page you want that will size that entry appropriately. So instead of having
    <div id="content">Content</div>
    use on your full width unique pages
    <div id="content" class="full_width">Content</div>
    With the CSS being
    .full_width { width: 100%, or 800px, or whatever is relevent; }

    Simply attach the class to the content DIV in the pages you want to be sidebarless. Not neccessarily the most elegant solution, but it works =p.

    The advantage of attaching a class instead of creating another DIV-id is that i’m guessing you want the content on all the pages to still be styled in the same manner just with a differing widths. If you used another DIV-ID you would have to duplicate the styling code for your current DIV-ID into the new div-ID, and anytime you are duplicating code problems will soon appear.

    okpeery,
    if you are talking about Pages then the simplest solution is to create custom Page template for your “sidebarless” display.
    See the instructions for creating template at the link above.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Deleting the sidebar’ is closed to new replies.