WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Widgets
[resolved] Except Page(s) not working (5 posts)

  1. GavinC
    Member
    Posted 2 years ago #

    I took a look through the forum here, and while it seems some people have run into this problem, I can't seem to find a fix that works for me. Basically:

    I have a widget that (for testing purposes) I'm trying to display on only one page. I can make it show on all pages, or no pages, but the "Except page(s)" rules don't seem to apply ever.

    I've tried:

    1. Only setting the Except Page rule once from the static state.
    2. From the static state, setting everything to "no", then going back and changing the Except Page rule.
    3. Setting wp_reset_query() before my dynamic sidebar call (the site does use a lot of custom queries).

    Any help would be great!

    http://wordpress.org/extend/plugins/dynamic-widgets/

  2. GavinC
    Member
    Posted 2 years ago #

    Ok, for the record, I immediately did some more poking around and found the "step by step tutorial" post, which provided me the answer to use "old method" in the advanced settings. Now it works :)

    Just out of curiosity, why does that work? Obviously something to do with the way I've constructed my theme, but any insight would be great.

    Otherwise, cool plugin, thanks!

  3. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    Hi GavinC,
    Great you found the solution already! :)

    The problem in FILTER method is a possible 'confusion' between the theme and DW. Most of the time it happens when your loading more then one page or other type (post) into one. DW does not know anymore what to follow. It starts with the detection process in wp_head() and is continued in the sidebars_widgets filter. That's most of the time the place where it goes wrong. When it suddenly detects something else, it has no clue anymore what to do. A wp_reset_query() does the trick sometimes. But it has to be done before a sidebar is loaded.

    The OLD method is processing everything in wp_head(), that's why it works in this case. Disadvantage of this method is it can leave you behind with a visual empty sidebar.

  4. zYx
    Member
    Posted 2 years ago #

    Can I use this plugin to display the latest posts in one of my widgets on my home page?

  5. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    Dynamic Widgets does not alter content within widgets. It only shows or hides widgets. For a full overview of what Dynamic Widgets can do for you, visit the plugin page.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.