[wp-testers] is_post_type not working correctly

Michael E. Hancock justmichaelh at gmail.com
Fri Jun 4 14:49:20 UTC 2010


From: <hedwig at senzafineonline.net>
>I spend a lot in the last weeks setting up my custom post types and 
>taxonomies and making my site work flawlessly with them but after 
>upgrading to RC1 I noticed everywhere in my theme where I used 
>is_post_type to determine what post type was being used to display 
>different content wasn't working so it would display all the content 
>regardless of post type.
>
> In short, does anyone else had this problem with this function? and  if 
> so, knows how to fix this problem?

I believe this is how it's intended:

is_post_type('book') returns true if book is a registered post_type

is_singular('book') return strue if you are viewing a post that has a 
post_type of book.


Michael 



More information about the wp-testers mailing list