[wp-trac] [WordPress Trac] #51542: is_home() returns true for any component of an XML Sitemap

WordPress Trac noreply at wordpress.org
Thu Oct 15 21:41:38 UTC 2020


#51542: is_home() returns true for any component of an XML Sitemap
--------------------------+-----------------------------
 Reporter:  MadtownLems   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Sitemaps      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51542>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list