Forums

[resolved] Can i hide menu's (widgets) on certain pages? (6 posts)

  1. tverdouw
    Member
    Posted 2 years ago #

    Is it possible to hide some menus' (widgets) on certain pages.
    For example i want the calender and the recent posts only be showed on the homepage, but not on all other pages.
    Is this possible, or can i download a plugin for this?

    Thanks

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try editing your theme's sidebar template file (possibly sidebar.php) and looking for:

    <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?>

    Try changing it to:

    <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar() || !is_home()) : ?>

    I think that will work...

  3. tverdouw
    Member
    Posted 2 years ago #

    Thanks esmi, but if i set the dynamic sidebar to home, the other menu's/widgets will also be hidden on other pages, and thats not what i want.

    I want some menu's/widgets to show up at home and others on other pages.

    Any other idea's?

  4. j-aperture
    Member
    Posted 2 years ago #

    A method I can think of is define a few more sidebars in sidebar.php so that you can have finer control over which widget appears on which page (e.g. put one widget in one sidebar). For each one of them, use is_home() function to specify whether it will appear on home or on other pages. If you want to be more specific, you can query the page name to fine-tune side bar behavior.

    << Website: http://maestroilluminist.com >>

  5. tverdouw
    Member
    Posted 2 years ago #

    Thanks maestro

    I found what i was looking for.
    Look here http://wordpress.org/extend/plugins/widget-logic/
    It's a plugin where you can define where to show up the menu's.

  6. surfsquish
    Member
    Posted 2 years ago #

    hello,

    Once you download the widget, where do you install the code?

Topic Closed

This topic has been closed to new replies.

About this Topic