Sidebar only on the homepage

Community Forums Forums Design Tips and Tricks Sidebar only on the homepage

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  rollo3000 1 year, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14094

    geekterium
    Participant
    Post count: 1

    Hello.

    I added a new Sidebar to the Theme.

    (top-sidebar-one)

    But the Sidebar is on every page.

    How can i make the Sidebar only visible on the frontpage?

    Thx

    #14100

    braddalton
    Participant
    Post count: 10563

    Use a conditional tag http://codex.wordpress.org/Conditional_Tags

    Or use a page layout with a sidebar on your front page


    #14104

    geekterium
    Participant
    Post count: 1

    The front page is the blog feed page.

    And the Conditional tags are not working :(

    #15418

    rollo3000
    Participant
    Post count: 3

    Conditional tags works for me.

    I add 2 widget areas only for my front page.

    /** Add Widget Area */
    add_action( ‘genesis_before_content’, ‘home_slider’ );
    function home_slider() {
    if ( is_front_page(”) )
    {
    echo ‘<div class=”home_slider”>’;
    dynamic_sidebar( ‘home_slider’ );
    echo ‘</div>’;
    }
    }

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.