WordPress.org

Ready to get started?Download WordPress

Forums

Make widgets show up on particular pages (7 posts)

  1. tonedru
    Member
    Posted 2 years ago #

    I've been having a difficult time with widgets. I have several widgets that I only need on certain pages, but not on others. I've tried 'Widget Contex't but can't seem to get it to work properly. Then I tried 'Widget Logic' but only seem to be able to get it to work on one page, but can't figure out how to make the widget appear on 4 or 5 different pages at the same time. Anyone have more knowledge on how these plugins work, or maybe know of a better one?

    Thanks!

  2. alanft
    Member
    Posted 2 years ago #

    for widget logic, if you mean wordpress pages, the main multi-page example on http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

    is_page( array( 42, 'about-me', 'About Me And Joe' ) )

    does the trick, you can give a list of IDs, slugs or page names

  3. govpatel
    Member
    Posted 2 years ago #

    try is plugin it will let you choose the pages you want them in for each widget
    http://wordpress.org/extend/plugins/widget-logic-visual/

  4. eleanorb
    Member
    Posted 2 years ago #

    I tried to get one widget to appear only on the calendar page, so I said
    is_page ('calendar') but the widget disappeared from all pages, even the calendar page. I also tried is_page( array( 17, 34 ) )  to have it appear on both the calendar and event pages, but again it just disappeared from all pages. What am I doing wrong? Also, I don't understand "try ticking the wp_reset_query option" (from the readme).

  5. alanft
    Member
    Posted 2 years ago #

    the wp_reset_query option is at the foot of the widget admin page

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

  6. eleanorb
    Member
    Posted 2 years ago #

    Okay, thanks! I found it, and I checked the wp_reset_query option, but the results are still the same -- doesn't appear on any page. Anything else I can try?

  7. alanft
    Member
    Posted 2 years ago #

    you could try seeing if it works in a default theme - which would rule out/in if it's your theme that's doing something - otherwise it's hard to diagnose where the problem might be.

Topic Closed

This topic has been closed to new replies.

About this Topic