query strings in wordpress and woocommerce
-
i have a url within a function that provides the user with a link to go to a main category page of products. however, I want the url to include a query string that will get to the category page & only display products with the $tag parameter (product_tag) that has been used in the function. this is a custom taxonomy ( product tags ).
<a href="' . get_bloginfo( 'url' ) . '/'. 'product-category'. '/' . $cat_slug . '?' . urlencode($atts["tag"]) . '"';so the url looks like this: ( tag being testingtag ) :
/product-category/schools/?testingtaghowever, it shows all products, and not just testingtag.
can anybody provide me with some insight as to how I should do this?
thank you
The topic ‘query strings in wordpress and woocommerce’ is closed to new replies.