• I’ve been reading up on Widget Logic, and it sounds like certain themes can cause interference with the logic conditionals used. This seems to be the case with my Atahualpa theme, and I’m wondering how to either fix the theme or find a word-around with Widget Logic.

    I’m using !is_home() in a couple of widgets (Recent Posts, and PHP Code) in the Atahualpa-defined right sidebar.

    First this caused correct behavior everywhere except pages that are one level deep (in a 3-level page tree). The widgets show up on top-level pages and their grandchildren, but not their children. After I changed to the Default theme and had to switch the logic to !is_front_page(), it worked properly on all pages.

    When I then switched back to Atahualpa (and moved the widgets over from the “Sidebar” to Atahualpa’s “Right Sidebar”), the behavior is actually different than it used to be. Now the widgets seem to be appearing on ALL pages, with !is_front_page() or !is_home(), including the home page.

    So now the widgets are inexplicably on the second-level pages, but also on the home page … which sort of defeats the purpose.

    I’m also using a static page for my home, rather than the WP default. Wondering if that might be throwing a monkeywrench into the works.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • for a static page you do want to use !is_front_page()

    i’ll look at the atahualpa code but it’s not that simple. have you tried the wp_reset_query and reading the faq generally?

    https://www.ads-software.com/extend/plugins/widget-logic/faq/

    I’m using the same theme and when widget-logic is active, I’m getting an error stating “javascript not active” I have to remove the plugin to gain login access again. I love this plugin so what can i do?

    i use the is_page() and !is_page() to make some widgets appear on some screens and not others. Is there another solution?

    Thread Starter Darren_S

    (@darren_s)

    Thanks, Alan. I tried wp_reset_query, but I’m not sure I have the syntax right for the Widget Logic field in the widget:

    wp_reset_query(); !is_front_page()

    I’ve also read the WL FAQ, and generally just gotten the impression that it’s probably a conflict with my theme. The fact that it’s displaying correctly with the Default theme seems to support this. The Atahualpa theme does call wp_head, and I’m not sure what else to look for.

    Thanks!

    you CAN call reset query in the logic like that, but there’s a specific option at the foot of the widget admin page (see https://www.ads-software.com/extend/plugins/widget-logic/screenshots/ ) that calls it before the sidebar is called

    also, note if you use full php logic like that you need to explicitly ‘return !is_front_page()’, ie put in which value you would like to RETURN. and also you need to put a ; at the end (see https://www.ads-software.com/extend/plugins/widget-logic/other_notes/ ) to make it valid php

    Thread Starter Darren_S

    (@darren_s)

    Thanks for that. I found the wp_reset_query option and ticked the box. My widgets have !is_front_page() as their logic … but still show on the front page.

    i’m out of straightforward ideas, but…

    if it is the theme (as you say, all is well if you switch to a default) and the wp_reset_query options isn’t enough perhaps atahualpa needs resetting many times – Widget Logic just does one reset per page. (i’ve downloaded atahualpa and skimmed through it and it *seems* harmless, but who knows…)

    so you could try hacking WL. find ‘$wp_reset_query_is_done=true;’ (line 152) and change true to false. this results in resetting the query before every sidebar widget

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Atahualpa Incompatible with Widget Logic?’ is closed to new replies.