custom taxonomy – query strings in wordpress

Question

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' ) . "https://wordpress.stackexchange.com/". 'product-category'. "https://wordpress.stackexchange.com/" . $cat_slug . '?' . urlencode($atts["tag"]) . '"';

so the url looks like this: ( tag being testingtag ) :

/product-category/schools/?testingtag

however, it shows all products, and not just testingtag.

can anybody provide me with some insight as to how I should do this?

thank you

0
Vba-new 2 months 2021-08-04T05:57:18-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse