Hey, I am creating a quiz which as a result would filter …

closed

Hey, I am creating a quiz which as a result would filter product catalog and show the filtered products. I understand that this is not what HD quiz is created to accomplish, but I tihnk that I just need to pass certain parameters (category slug, tag ) to a wp query and display results, but would it be possible to generate those args and pass it to wp_query?
Also do you know if it is compatible with WPML plugin? Thanks a lot for your work, I would love to try it out!

This thread has been imported from harmonicdesign.ca/hd-quiz/

March 29, 2022 at 2:34pmGiedrius

Hi Giedrius,
this depends on how your site is set up, but WooCommerve allows you to filter products based on URL parameters.

So for example, a URL like /product-category/*****?product_tag=******* should show only products in that category and that has that tag (replacing the ** with the slugs of course). You can use this instead of messing with wp_query.

However, you’ll probably want to redirect to whatever page you want once the quiz has been completed right? Take a look at this old thread to see how you can hook into HD Quiz to detect when the quiz has been completed and to redirect to a new page:

https://wordpress.org/support/topic/auto-redirect-and-one-time-quiz/#post-13662511

31 March 2022 — 16:34support admin Dylan

This thread has either been marked as complete or has been automatically closed due to inactivity. Please consider opening a new support thread for help.