check if post id exists wordpress
snippet in php

check if post id exists wordpress

user7266

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