Support » Themes and Templates » Show Sidebar on just home page

  • Resolved Evoroth


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    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

    That’s perfect! Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show Sidebar on just home page’ is closed to new replies.