Check If Post Id Exists WordPress

post_exists(get_the_title($postID)); //returns $postID or 0

Leave a Comment