Title: Multiple Logics
Last modified: August 21, 2016

---

# Multiple Logics

 *  [teclive](https://wordpress.org/support/users/teclive/)
 * (@teclive)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/multiple-logics/)
 * Hi there, hope you are doing well.
    Is is possible to have more than one logic?
 * I would like to have a widget show up for all pages under a few different categories,
   is this possible?
    Can I put something like the following into the widget-logic
   area ?
 * is_single() && in_category(‘category1’)
    is_single() && in_category(‘category2’)
   is_single() && in_category(‘category3’) is_single() && in_category(‘category4’)
 * Thank you for your time
    Tanya
 * [https://wordpress.org/plugins/widget-logic/](https://wordpress.org/plugins/widget-logic/)

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

 *  [dteunkens](https://wordpress.org/support/users/dteunkens/)
 * (@dteunkens)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/multiple-logics/#post-5104750)
 * How about
    is_single() && (in_category(‘category1’) || in_category(‘category2’)
   || in_category(‘category3’) || in_category(‘category4’))
 * || = OR
 * So basically, this is saying:
    If single and part either one of the following
   categories: 1, 2, 3 or 4
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/multiple-logics/#post-5104751)
 * First take care you are using the right tag. The difference between in_category
   and is_category is important.
 * And fortunately both of those take arrays of lists of categories. Check out the
   codex here
 * [http://codex.wordpress.org/Conditional_Tags#A_Category_Page](http://codex.wordpress.org/Conditional_Tags#A_Category_Page)

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

The topic ‘Multiple Logics’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-logic_c8dde5.svg)
 * [Widget Logic](https://wordpress.org/plugins/widget-logic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/widget-logic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/widget-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-logic/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [alanft](https://wordpress.org/support/users/alanft/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/multiple-logics/#post-5104751)
 * Status: not resolved