[resolved] Show Sidebar on just home page (3 posts)

  1. Evoroth
    Posted 7 years ago #

    I was wondering if it was possible to show sidebar.php on just the home page of a skin?

    The setup I have is that the home page of my site/skin is made up from a page as opposed to a series of posts and then I have multiple pages on the site after that. However, the information I have in my sidebar (for example a list of services), I only want to show on the home page.

    I've tried a couple of ways myself but it shows on every page and now I'm not sure where to go from here or if it's possible.

    Any help is greatly appreciated.

  2. stvwlf
    Posted 7 years ago #


    First determine which template is being used to display your homepage. If it is a page, its likely to be page.php

    change the call to include the sidebar to this:

    <?php if (is_front_page()) {

    in all the other templates, remove or place comments around the call to the sidebar
    <?php // get_sidebar(); ?>
    Then the sidebar will not be included when that template is being used.
    archive.php possibly others

  3. Evoroth
    Posted 7 years ago #

    That's perfect! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic