[wp-hackers] Does is_post_type() exist?
awgandrews at gmail.com
Wed Apr 13 11:37:36 UTC 2011
Thanks - knew there had to be something, though I could do $post->post_type
== 'podcast' or whatever as needs be!
All the best,
On 13 April 2011 12:31, Andrew Nacin <wp at andrewnacin.com> wrote:
> On Wed, Apr 13, 2011 at 7:28 AM, Alex Andrews <awgandrews at gmail.com>
> > Hi all,
> > This is surely a function that must exist, but I can't seem to find it
> > anywhere. Does it?
> > All the best,
> > Alex
> It was called is_post_type() for a bit during the 3.0 cycle, but we renamed
> it. http://core.trac.wordpress.org/ticket/13747
> If you're looking for the post type of a post, use is_singular( $post_type
> or get_post_type( $post ).
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers