$wp_rewrite and $wp_query
-
Hi,
I have this problem with including a query var in wp_query. I’m using the rewrite rules for it, and in the $wp_rewrite that variable exist:
[products-page/example-cat/(.+?)/?$] => index.php?pagename=products-page&category_id=22&selected_brand=name-of-the-brand
however when I access mysiteurl/products-page/example-cat/name-of-the-brand/ the variable don’t apear in wp_query.
This code should insert it:
function wpsc_query_vars($vars) { $vars[] = "selected_brand"; return $vars; } add_filter('query_vars', 'wpsc_query_vars');
But is not doing it.
Any idea what i’m doing wrong?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘$wp_rewrite and $wp_query’ is closed to new replies.