• This is a follow up to http://wordpress.org/support/topic/176819

    I have added…

    <?php if (!is_home()) {
    ?>
    MENU/TOOLBAR
    <?php
    }
    ?>

    …around a tool bar and it works perfectly. It does not show up on the first page.

    But now I want a different toolbar to show up on the home page. How do I do an “if/than”? If home page, show this not that, if secondary page show that not this.

    And even more advanced, is there a way to have a 3rd option? Like if it is a member page to have a different navbar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Create a new sidebar for the home page. Call it sidebar-home.php. Then use:

    <?php
    if(is_home() get_sidebar('home');
    else get_sidebar();
    ?>

    You could then go on to create a sidebar for a specific page (eg sidebar-about.php) and use:

    <?php
    if(is_home()) get_sidebar('home');
    elseif( is_page('about')) get_sidebar('about');
    else get_sidebar();
    ?>

    See http://codex.wordpress.org/Conditional_Tags for more ideas.

    I am trying to figure out how to make the a widget appear only on the home page. What I have done thus far is created a new page called sidebar-home.php and added this bit of code to the end of the home-template.php

    <?php
    if(is_home-template() get_sidebar("home");
    else get_sidebar();
    ?>

    I am getting an error message on the if… line. I have tried every variation I can think of for is_home; is_home-template.php; is_…?

    any ideas of why this is not working?

    hope this helps: TS Custom Widgets – http://www.thaslayer.com/free-plugins/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show menu only on home page?’ is closed to new replies.