check post is exist or not by post id wordpress code example Example: check if post id exists wordpress post_exists(get_the_title($postID)); //returns $postID or 0