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