Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #57816, comment 4


Ignore:
Timestamp:
06/14/2023 07:10:20 AM (18 months ago)
Author:
swissspidy
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57816, comment 4

    initial v1  
    1 The `WP_User_Query` in `WP_Sitemaps_Users` uses `'has_published_posts' to only list users with at least 1 published post in any post type (including pages, excluding attachments).
     1The `WP_User_Query` in `WP_Sitemaps_Users` uses `'has_published_posts'` to only list users with at least 1 published post in any post type (including pages, excluding attachments).
    22
    33Since pages are not normally shown in the author archives, we could add `unset( $public_post_types['page'] );` here:
     
    66
    77That said, the author archive for a user with no published posts returns a 200 status (albeit an empty page), not a 404. So... not sure if that needs to be changed at all 🤷‍♂️
     8
     9Edit: also, what happens if a site actually does show pages in author archives too?