Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #50571, comment 5


Ignore:
Timestamp:
07/08/2020 02:12:26 AM (4 years ago)
Author:
elrae
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50571, comment 5

    initial v1  
    1 I've added a patch with your approach @swissspidy but I excluded the 1 === $pagenum as that variable isn't available in this function. There's also no $paged in there to know if we're on the first page. However, the check against 'page' === $post_type and the max($min_num_pages, $query->max_num_pages) should cover us
     1I've added a patch with your approach @swissspidy but I excluded the 1 === $pagenum as that variable isn't available in this function. There's also no $paged in there to know if we're on the first page. However, the check against 'page' === $post_type and the max($min_num_pages, $query->max_num_pages) should cover us. I verified creating 2002 blog posts gave us 2 pages of posts in the sitemap and generating 4004 pages gave us 3 pages of pages in the sitemap. With 0 blog posts and 0 published pages we also got the proper experience of no posts showing up, and 1 page of the pages with the index URL set.