• 2 widgets at sidebar.php using “widget logic” conditional plugin
    Widgets tested: “Categories” and “Recent Posts”

    WP templates: (settings – front page shows:)
    Front page shows: page named “home”
    Blog shows: page named “blog”

    Both widgets use “!is_front_page()”

    When used in order:
    CATEGORIES
    RECENT POSTS.

    Both widgets show up on both “Home” (front page) and “Blog” page.

    When used in order:
    RECENT POSTS
    CATEGORIES.

    only RECENT posts show up at “Home” and BOTH widgets on the “Blog” page.

    Here’s the source of the problem, I think:
    I’m recycling templates (at least until I’m satisfied with content and design) so I made both home and blog templates to share the same file.
    i.e. index.php has “Template Name: blog” inside.

    I can’t seem to find a condition to show both widgets on blog page (page named “blog”) but not in front page (page named “home”)

    PD: Using the query fix doesn’t work here.

Viewing 1 replies (of 1 total)
  • interesting. one guess would be that the recent posts widget is messing up the main page query conditions, so you’d have to do a reset query after that widget has run.

    you could try that a couple of ways. one hack WL do do the reset after every widget instead of just the once (as it currently does)

    OR (perhaps more sensibly) do the reset in the following widget’s WL code. if the code is currently

    !is_front_page()

    change it to

    wp_reset_query(); return !is_front_page();

    note the final ;

    see if that changes things.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Widget Logic] Sequence of WP widgets alters page type behavior’ is closed to new replies.