Maybe something like: if ( $post = get_post($post_id) && 'post' == $post->post_type && 'publish' == $post->post_status) { // do stuff } Of course, it depends on what you're doing. So, there's no universal "best way". -- http://scribu.net