Make WordPress Core

Opened 14 months ago

Last modified 14 months ago

#51542 new defect (bug)

is_home() returns true for any component of an XML Sitemap

Reported by: MadtownLems Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Sitemaps Keywords:
Focuses: Cc:


It seems that any component of the core wp-sitemap.xml implementation returns true for the conditional tag is_home() (regardless even of if the homepage is set to display "Your Latest Posts" or "A static page").

For example, www.site.com/wp-sitemap-posts-page-1.xml will return true.

This can easily cause problems with themes and plugins that use filters and the is_home() conditional tag to control which posts appear on the homepage.

Change History (1)

#1 @swissspidy
14 months ago

Possible duplicate of #51117

Note: See TracTickets for help on using tickets.