diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 9bdab3601e..2d546bc89a 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -337,7 +337,7 @@ function url_to_postid($url) { // Do the query $query = new WP_Query($query); - if ( !empty($query->posts) && ($query->is_single || $query->is_page) ) + if ( !empty($query->posts) && $query->is_singular ) return $query->post->ID; else return 0;