Support » Fixing WordPress » Having Trouble Removing Sidebar

  • Resolved hughesj94

    (@hughesj94)


    Hello,

    I’m somewhat new to word press and trying to modify a blog that another employee at my work made awhile ago.

    The page is:
    http://corpcredit.net/corporate-credit

    What I’m trying to do is remove the “search” and “latest articles” sections and expand the main content section into that area.

    I’ve tried searching around for the solution but can’t find much that helps. I tried removing the following from page.php:

    <?php get_sidebar(); ?>

    That didn’t do anything (Seemingly)

    Then I tried deleting all the code on sidebar.php. That got rid of the “search” and “latest articles” sections, but I couldn’t get the main content section to fill the empty space.

    Is there an easy way to do all this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Becky Davis

    (@bdgardengirl)

    WCEU 2016 Contributor

    Once you’ve removed the sidebar, you now have to increase the width of the content div to take up the full width. Your outer wrapper ‘content’ is 940px wide, but ‘leftcontent’ is 580. Increase that width in your stylesheet and you should be good.

    When I create a new theme I almost always make 2 templates, one with and one without sidebar, that way you always have a choice depending on the page content. https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/

    Michael

    (@alchymyth)

    Forum Moderator

    the ‘corporate credit’ page might not be based on page.php – check for example if the page is using a page template… or it might even be the index page which is either using index.php or home.php

    Thanks guys. I removed that same line of code from page.php and set the left content width to 940 and right to 0. looks the way I want it to now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Having Trouble Removing Sidebar’ is closed to new replies.