WordPress.org

Ready to get started?Download WordPress

Forums

Deleting the sidebar (10 posts)

  1. jmeeter
    Member
    Posted 7 years ago #

    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

  2. Alex Cragg
    Member
    Posted 7 years ago #

    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.

  3. MrCoke
    Member
    Posted 7 years ago #

    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?

  4. Alex Cragg
    Member
    Posted 7 years ago #

    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.

  5. MrCoke
    Member
    Posted 7 years ago #

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

  6. jmeeter
    Member
    Posted 7 years ago #

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

  7. jmeeter
    Member
    Posted 7 years ago #

    Anyone?

  8. okpeery
    Member
    Posted 6 years ago #

    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?

  9. nucleon
    Member
    Posted 6 years ago #

    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.

  10. moshu
    Member
    Posted 6 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic