wordpress if post type exists code example
Example: check if custom post type exists
post_exists(get_the_title($postID), '', '', $slug_post_type); //Returns $postID or 0
post_exists(get_the_title($postID), '', '', $slug_post_type); //Returns $postID or 0