I have a multisite setup, and I used the request filter from the Wordpress API (https://codex.wordpress.org/Plugin_API/Filter_Reference/request) to try to alter a query before a page load, and I took a look at the query parameters that this filter receives, which is an array. I noticed that depending on the site within my multisite network, sometimes the query parameters being passed to my request filter function are different. On one site, the array has only keys for "pagename" and "lang" parameters, but on other sites the function receives "post_type", "name" and a "products" parameter that corresponds to a custom post type slug.

Why do different sites receive different query parameters during the request filter? What I'm trying to do is implement this solution (https://stackoverflow.com/questions/31621722/have-a-wordpress-page-with-same-title-as-custom-post-type-front-slug/31736344) to resolve a URL conflict between a page products and a custom post type products, but sometimes this conflict doesn't occur on some of my sites, but it does in others, and it seems to be due to these differences in query parameters, but why does this occur?

Thanks and regards

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.