get_query_var function not working at all
WordPress doesn’t automatically add all query string params ($_GET params) as query_vars. When Query Var somevar is not registered: example.com/some-page/?somevar=hello – WordPress ignores somevar When Query Var somevar is registered: example.com/some-page/?somevar=hello – WordPress stores the value of this param in the $wp_query->query_vars array The difference between registering that variable with WordPress is whether the value … Read more