$exists = post_type_exists( 'post' );
// returns true
$exists = post_type_exists( 'page' );
// returns true
$exists = post_type_exists( 'book' );
// returns true if book is a registered post type
$exists = post_type_exists( 'xyz' );
// returns false if xyz is not a registered post type
You must log in before being able to contribute a note or feedback.
Basic Examples