Make WordPress Core

Opened 4 years ago

Last modified 21 months ago

#52434 new enhancement

Add a way to inject alternate links for entries in wp-sitemap.xml

Reported by: nonverbla's profile nonverbla Owned by:
Milestone: Future Release Priority: low
Severity: normal Version: 5.6
Component: Sitemaps Keywords:
Focuses: Cc:

Description

Hi there! Loving the new built-in feature to let WordPress generate sitemaps! Today I tried to add alternate links to my sitemap (for translated posts), but with no luck. Looking at the core and documentation, only lastmod and some other tags are supported, but I would need tags of type xhtml:link as described here: https://translatepress.com/multilingual-sitemap-wordpress-site/

Any chance there will soon be a way to inject more complex tags to sitemap entries?

Change History (2)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Sitemaps

#2 @swissspidy
21 months ago

  • Milestone changed from Awaiting Review to Future Release
  • Priority changed from normal to low
  • Type changed from defect (bug) to enhancement

We experimented with adding support for extensions in the feature plugin, see https://github.com/GoogleChromeLabs/wp-sitemaps/issues/151 for context. It was not trivial though to get things adhere to the spec automatically. But maybe we can move this responsibility to the developer instead and keep the code simpler.

Note: See TracTickets for help on using tickets.