query_vars value mysteriously modified on the way
-
Hello guys, I’m using this to add a “handle” query parameter:
add_rewrite_tag('%handle%', '([^&]+)'); add_rewrite_rule('^product/([A-Za-z\-]+)/?', 'index.php?handle=$matches[1]', 'top');
Which works. But sometimes, when handle is something like “myproduct-25”, the handle parameter value comes as “myproduct-“, without the “25”.
This is how I fetch the value:
global $wp_query; echo $wp_query->query_vars['handle']
Does anyone know why this happens and how to fix?
Thanks a bunch!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘query_vars value mysteriously modified on the way’ is closed to new replies.