Title: conditional logic weirdness
Last modified: August 19, 2016

---

# conditional logic weirdness

 *  [wordpig](https://wordpress.org/support/users/wordpig/)
 * (@wordpig)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/conditional-logic-weirdness/)
 * 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](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)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/conditional-logic-weirdness/#post-1960610)
 * 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](http://codex.wordpress.org/Function_Reference/wp_reset_query)
 *  Thread Starter [wordpig](https://wordpress.org/support/users/wordpig/)
 * (@wordpig)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/conditional-logic-weirdness/#post-1960612)
 * ah thanks, I’ll give that a try
 * meanwhile, I meant is_front_page()
 *  Thread Starter [wordpig](https://wordpress.org/support/users/wordpig/)
 * (@wordpig)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/conditional-logic-weirdness/#post-1960635)
 * 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!!!
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/conditional-logic-weirdness/#post-1960733)
 * 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.

 * 4 replies
 * 3 participants
 * Last reply from: [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/conditional-logic-weirdness/#post-1960733)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
