[solved] Woo: products query inside a supplier template

hey guys
i’m back again with an odd issue i bet i should be able to solve with your help.

involved: woocommerce, acf.

an agency hired me for a complete redesign of the current webshop for its client. the shop have multiple suppliers, and i created the taxonomy ‘supplier’. i am able to filter the main shop page using categories, tags, and suppliers too, so the taxonomy works.

i created a page listing all suppliers, and i’ve also created a template for the single supplier. i’d like to show the products from the suppliers in a query. i’m trying related posts module, and it works, but the customization is a little bit lacking. the shop page does not use the default ‘product list’ element, I’d a custom query, and i want the same look and feel, something that the related posts (even if it works out almost of the box) is not allowing me.

this, i’m sure, will do the trick, but if you put the ‘supplier’ taxonomy, you have a list of all the suppliers, not the post associated with that one.
if you put the ‘product’ post, you have ALL the products, not the one from that supplier. i am sure we are able to do it, it’s basic wordpress: ‘show mw everything in this taxonomy’. the problem here is that the taxonomy depends on the supplier page you are in, and i cannot find the right combinations. taxonomy query should do it, but how can i define the right dynamic input?

tldr:

page about taxonomy A including only posts with that taxonomy
page about taxonomy B including only posts with that taxonomy

thanks, i love you.

i wasted my weekend on this and i still have the problem. i looked in other forums, some tutorials, but there is always something missing.
maybe i presented the issue badly, english is not my main language. let’s put it simple, still hope ho find a solution. i’ll use a more common example: authors.

  1. a page listing every author (easy, done).
  2. a page about authors with dynamic data from custom fields like name and image (easy, done).
  3. a query loop in the page showing posts only for the author’s page you are in (this is my issue).

i cannot find a way for the query to understand the author page, and then filter the relevant posts.

1 Like

I’m interested in how to solve this too. I’m brand new to queries and custom fields, and will be learning them soon.

ok, i can say it’s solved. i convinced the agency to use metabox. done in 3 seconds.