Title: [Plugin: Widget Logic] Parse error
Last modified: August 19, 2016

---

# [Plugin: Widget Logic] Parse error

 *  Resolved [antonlargiader](https://wordpress.org/support/users/antonlargiader/)
 * (@antonlargiader)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-widget-logic-parse-error/)
 * I added a text widget that I only wanted to appear for material in the subcategory
   NARS which is category 8. I put the following into the Widget logic box:
 * is_category(‘NARS’) || (is_single() && in_category(‘NARS’)
 * The widget only appeared on the home page (although the other displays were being
   handled by the ‘The Event Calendar’ plugin.
 * Thinking it was a theme problem I clicked to preview the site in the default 
   theme and saw this where the widget would go:
 * Parse error: syntax error, unexpected ‘;’ in /usr/local/4admin/apache/vhosts/
   bmwra.org/httpdocs/wp/wp-content/plugins/widget-logic/widget_logic.php(161) :
   eval()’d code on line 1
 * Any ideas what is wrong?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-widget-logic-parse-error/#post-1436441)
 * assuming you’ve copied and pasted your code above, there is a ) missing off the
   end.
 *  Thread Starter [antonlargiader](https://wordpress.org/support/users/antonlargiader/)
 * (@antonlargiader)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-widget-logic-parse-error/#post-1436458)
 * D’oh!! So simple.
 * There’s definitely something funny still going on with refresh, though. I edited
   it, fixed the error, then when I went back to edit the widget text the old widget_logic
   value got saved again. Hitting refresh at the right moment fixes it but it’s 
   certainly not doing exactly what one would expect.
 * But, it’s working!
 *  Thread Starter [antonlargiader](https://wordpress.org/support/users/antonlargiader/)
 * (@antonlargiader)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-widget-logic-parse-error/#post-1436461)
 * In my defense, I simply copied that string from the bottom of the FAQ and edited
   the values. So you might edit that FAQ.
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-widget-logic-parse-error/#post-1436571)
 * ha ha, yes! i will! thanks 🙂
 * “I edited it, fixed the error, then when I went back to edit the widget text 
   the old widget_logic value got saved again”
 * let me check on this – my install is subtly different…
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-widget-logic-parse-error/#post-1436572)
 * i’m definitely not seeing that the way i change stuff and save. if you can replicate
   this and give me click by click directions, i’ll see what i can find.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: Widget Logic] Parse error’ is closed to new replies.

 * 5 replies
 * 2 participants
 * Last reply from: [alanft](https://wordpress.org/support/users/alanft/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-widget-logic-parse-error/#post-1436572)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
