- Timestamp:
- 07/14/2020 12:24:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php
r48474 r48476 175 175 $query = new WP_Query( $args ); 176 176 177 return isset( $query->max_num_pages ) ? $query->max_num_pages : 1; 177 $min_num_pages = ( 'page' === $post_type && 'posts' === get_option( 'show_on_front' ) ) ? 1 : 0; 178 return isset( $query->max_num_pages ) ? max( $min_num_pages, $query->max_num_pages ) : 1; 178 179 } 179 180
Note: See TracChangeset
for help on using the changeset viewer.