[wp-hackers] check category template

Otto otto at ottodestruct.com
Thu Jan 17 15:51:34 GMT 2008

On 1/16/08, Mindshare Studios <info at mindsharestudios.com> wrote:
> The template function in_category('x') will return true even if you are
> viewing the category page itself (not a post within it). Is there a way to
> determine if you are looking at post within a category or the category
> listing itself?

Why would it do that? It's looking at the global $post, which should
not be set until you've called the_post().


More information about the wp-hackers mailing list