Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
287 stars 205 forks source link

Add author(s) to Rank SEO XML sitemap #1004

Open GaryJones opened 9 months ago

GaryJones commented 9 months ago

(From: https://wordpress.org/support/topic/secondary-author-does-not-show-up-in-sitemap/)

It seems the authors that are not set to primary on any blog post are excluded from the XML sitemap.

Looks like there's a rank_math/sitemap/author/query filter, but this only amends the args that are passed to get_users() (which uses WP_User_Query() internally). See seo-by-rank-math/includes/modules/sitemap/providers/class-author.php.

If Author Archives are Enabled, and set to Index (default is Enabled but No Index) in Titles and Meta, then Rank Math creates a /author-sitemap.xml page, which looks like:

Screenshot 2023-09-20 at 13 15 42

The markup for a row looks like:

<tr>
    <td><a href="http://localhost:10008/author/admin/">http://localhost:10008/author/admin/</a></td>
    <td>0</td>
    <td>2023-07-23 10:35 +00:00</td>
</tr>