Remove Sidebar and comments from all pages but the homepage (5 posts)

  1. shlinklincoln
    Posted 8 years ago #


    Still new to CSS and HTML. I would like to remove the Sidebar and comments section from every page except my homepage. I'm using the FallSeason theme. Any help would be greatly apreciated.



  2. oscarmota
    Posted 8 years ago #

    Go to single.php template and look for the sidebar call function, try to remove it, Do a Backup!! :D

  3. Kafkaesqui

    Posted 8 years ago #

    "Go to single.php template and look for the sidebar call function"

    Which is:

    <?php get_sidebar(); ?>

    If your theme does not provide a single.php (single post) template, you can always add one. Easiest way to do this is to copy your index.php and rename that single.php.

    Another (but more programmatic) way to handle the display of your sidebar based on where one is on your blog is through WordPress' conditional tags:


  4. shlinklincoln
    Posted 8 years ago #

    Thank you both. That points me in the right direction.

  5. jemaverick
    Posted 8 years ago #

    You should basically remove <?php get_sidebar(); ?> from every page except for index.php (archives.php, tags.php, category.php, single.php, 404.php, page.php, search.php).

    For navigational purposes, make sure that you leave some sort of link back to the homepage. Most themes have these in the header.php file, so be sure to leave something there!

    I'm currently building my site, and I've taken the sidebar out of everything! Look here. :)

Topic Closed

This topic has been closed to new replies.

About this Topic