[wp-hackers] Does is_post_type() exist?

Alex Andrews 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,

Alex

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>
> wrote:
>
> > 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
>
>
> post_type_exists().
>
> 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 ).
>
> Nacin
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list