Sitemap returns true on is_front_page()
-
Hello,
Not sure If I posted this in the right place, but I’m curious if someone can help me with more information.
We have a plugin that collects some data to create statistics. For example, for the homepage, we have this code:
if ( $wp_query->is_front_page() ) { return 'frontpage'; }
When visiting an XML sitemap, the if is still accessed because somehow it is detected as frontpage.
I don’t know if this issue coming from WordPress or hosting. Of course, I’m not sure if this is an issue at all, maybe this is correct behavior.
Thanks,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sitemap returns true on is_front_page()’ is closed to new replies.