[wp-hackers] Does is_post_type() exist?

Andrew Nacin wp at andrewnacin.com
Wed Apr 13 11:31:51 UTC 2011


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


More information about the wp-hackers mailing list