Adding a widget on front page only

  • johni33

    #5508

    I’d like to add a recent posts widget for my bbPress forum on the front page of my site,

    I’ve done this by dropping it on one of the action hooks and it works fine on the front page. (I don’t want the widget in the sidebar)

    however tihs method means that the widget is still visible when I go to the forum itself which isn’t what I want.

    I’d like to find a way of displaying this widget only on the front page so how can I do that?

    http://www.cpsarc.com

    ronangelo

    #32087

    install the widget logic plugin

    http://wordpress.org/extend/plugins/widget-logic/screenshots/

    use the code

    is_home()

    Anonymous

    #32088

    A slightly easier alternative is the the GUI interface for the widget logic plugin called Widget Logic Visual plugin.

    It allows you to specify which page plugins appear on

    Anonymous

    #32089

    BTW,

    which action hook did you use? There are specific action hooks for the homepage only; then you don’t need to use widget logic.

    johni33

    #32090

    I used graphene_top_content in header.php which places my widget just under the slider which is fine.

    I see some hooks for homepage panes, I’ll give them a try

    Anonymous

    #32091

    How did it work?

    Martin

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

  • You must be logged in to reply to this topic.