• Using the widget logic plugin (which is really very cool) to customize the sidebar content on our blog using conditional logic. Works brilliantly except for a few annoyances.

    Weirdly, neither of the conditional designed to put content on the front page seem to work ..

    Both

    is_home()
    is_front page()

    produce nada

    Am guessing this has to do with the way our theme is structured – not sure if the front page we’re using is technically a static page or … something else. ? Or if – possibly more reasonably – there is some other way to hack a statement that will get what I want on the front page ..

    if you’re curious

    http://www.thehealthcareblog.com

    There are also a few situations where statements are glitching and widgets are appearing for no reason I can make out ..

    Anybody run into these issues before?

Viewing 4 replies - 1 through 4 (of 4 total)
  • only a guess:
    sometimes themes use custom queries in the template files, so that the query_string (which would have the information to identify the page) is messed up, and sidebar codes get the wrong information;

    to reset this, try to add a wp_reset_query(); at the beginning of the sidebar code.

    http://codex.wordpress.org/Function_Reference/wp_reset_query

    Thread Starter wordpig

    (@wordpig)

    ah thanks, I’ll give that a try

    meanwhile, I meant is_front_page()

    Thread Starter wordpig

    (@wordpig)

    okay – this is a little technical for my skillset – I’m going to need to wait for somebody to give me a hand. In the meantime, can anybody think of a hack to get a widget to display?? I’m a bit desperate!!!

    Note:

    is_home() will return true whenever the blog post index is being displayed.

    is_front_page() will return true whenever the Front Page of the site is being displayed, whether the Front Page is set to display the blog post index or a Static Page.

    So first question: which are you displaying on the Front Page: blog posts, or a Static Page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘conditional logic weirdness’ is closed to new replies.