WordPress.org

Support

Support » Themes and Templates » Remove Sidebar and comments from all pages but the homepage

Remove Sidebar and comments from all pages but the homepage

Viewing 4 replies - 1 through 4 (of 4 total)
  • Go to single.php template and look for the sidebar call function, try to remove it, Do a Backup!! 😀

    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:

    http://codex.wordpress.org/Conditional_tags

    shlinklincoln
    Member

    @shlinklincoln

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

    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. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Sidebar and comments from all pages but the homepage’ is closed to new replies.