I have created a custom search form that populates with product attributes. The url generated is something like ?s=&post_type=product&pa_accreditation=19&pa_course-type=21&pa_date=9&pa_location=24
, however, this returns all products and the attributes in the string are ignored.
How to add attributes to the search string.
Thank you in advance.
Looks like a similar question to this https://wordpress.stackexchange.com/questions/69271/search-url-parameters-query
Maybe your variables “pa_accreditation”, “pa_course” and “pa_date” are not defined in your query_vars
As mentioned in the link above, you can do this like so