I am trying to hide a particular widget for all posts in 2 categories and show it on the rest. It works when I have the code for only one category:
Then when I try the following, it doesn’t work. The widget still shows on both:
!in_category(‘category1’) || !in_category(‘category2’)
as well as
I also tried the following, and when I do this, it hides the widget completely everywhere
!in_category(‘category1’ || ‘category2’)
- The topic ‘Conditional tag doesn't work when I use "||" for multiple categories’ is closed to new replies.