Ticket #50571: 50571.diff
File 50571.diff, 627 bytes (added by , 4 years ago) |
---|
-
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php
172 172 173 173 $query = new WP_Query( $args ); 174 174 175 return isset( $query->max_num_pages ) ? $query->max_num_pages : 1; 175 $min_num_pages = ( 'page' === $post_type && 'posts' === get_option( 'show_on_front' ) ) ? 1 : 0; 176 return isset( $query->max_num_pages ) ? max( $min_num_pages, $query->max_num_pages ) : 1; 176 177 } 177 178 178 179 /**