[wp-hackers] in_category() and Pages

Sergey Biryukov sergeybiryukov.ru at gmail.com
Tue Dec 14 22:56:12 UTC 2010

I've noticed that in_category(1) returns true for some pages (i.e.
About) both in WordPress 3.0.3 and 3.1-beta1-16884 with Twenty Ten
theme and no plugins.

For some other pages it returns false. I haven't figured out the
pattern yet. is_single() && in_category(1) works fine.

I supposed that it should only return true for posts in the specified
category. Is this a bug or intended behaviour?


More information about the wp-hackers mailing list