Opened 3 months ago
Last modified 3 months ago
#57816 new defect (bug)
WordPress shows author archive in sitemap even if there are no posts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Sitemaps | Keywords: | needs-patch |
Focuses: | Cc: |
Description
It looks like this should be avoided: If there are no posts in the WP installation (only pages), the wp-sitemap.xml
still contains the author archive. And if you follow the link, you get a 404 error.
This couldn't make sense for SEO ...
Change History (2)
#2
@
3 months ago
Found this:
Should only be generated for those authors with at least 1 published post.
Source: https://github.com/GoogleChromeLabs/wp-sitemaps/issues/23
Looks like this is a bug then.
Note: See
TracTickets for help on using
tickets.
Yes whenever page is added, author archive is present in the sitemap.xml
Is this a bug, I don't know
About 404 error, I think it depends on a theme (that was not an issue in my local wordpress-develop installation)
If this is a bug, I'm willing to provide a patch (just not sure about that)
For now, I'm leaving the code to possibly fix this as a use of a filter