Bug – site map is appended to the_content in secondary queries
-
Problem:
When the plugin appends the site map to the content of the Archive Page (from the SiteTree Dashboard settings), via thethe_content
filter, it also appends it to any other custom queries on that page who’s loop usesthe_content()
.Steps to reproduce:
- Take any theme that has a custom secondary loop (created correctly via a
new WP_Query
) that usesthe_content()
, whether it be in the header, footer, or custom page template. - Set that page to be the Archive Page via the SiteTree Dashboard.
- View the page and notice that the site map is appended to the secondary query’s
the_content
filter along with the correct page’sthe_content
.
Possible fix:
Either the SiteTree class’sfilter_page_request
orappend_sitemap
methods need a check foris_main_query()
or something similar to make sure you’re not messing with custom loops. - Take any theme that has a custom secondary loop (created correctly via a
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug – site map is appended to the_content in secondary queries’ is closed to new replies.