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