Title: Category code not working
Last modified: August 20, 2016

---

# Category code not working

 *  [enderpal444](https://wordpress.org/support/users/enderpal444/)
 * (@enderpal444)
 * [15 years ago](https://wordpress.org/support/topic/category-code-not-working/)
 * Ok so Im trying to lock a sub-category widget to a category page and it’s posts
   and I used the code ‘is_category || (is_single && in_category(X)’ but it still
   shows up on every page. When I just use is_category() it does the same thing 
   still showing up on home page.
 * Now when I use is_single() it finally disappears from home which has me baffled
   lol. Someone help me =)

The topic ‘Category code not working’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [enderpal444](https://wordpress.org/support/users/enderpal444/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/category-code-not-working/)
 * Status: not resolved