I have a widget that I need to show up everywhere EXCEPT for on the blog page, a listing of all posts from the blog category (mysite.com/category/blog) and any individual posts in the category "blog."
I placed the following code in the WidgetLogic area of the widget (it's just a text widget), but the widget keeps showing up on individual posts:
!is_category('blog') || (is_single() && !in_category('blog'))
To me, this should say that the widget should not show up if the category is blog OR if it's a single post AND in the category 'blog'. But it keeps showing up on individual posts that are in the "blog" category (the only category I am using on blog posts).
What am I doing wrong?