i have a lot of product categories on the website - 100+ some products are tagged as "is_new" via custom field. When that happens that are also automatically assigned to a product category "New". Meaning each product can be assign to its own category + category "New". When i go to category new in the front end i want users to see all categories that contain "New" products for navigation.
What would be the best way to do that? First select all "new" products and then get a tree from their categories? or is there a better way?
i have a lot of product categories on the website - 100+ some products are tagged as "is_new" via custom field. When that happens that are also automatically assigned to a product category "New". Meaning each product can be assign to its own category + category "New". When i go to category new in the front end i want users to see all categories that contain "New" products for navigation.
What would be the best way to do that? First select all "new" products and then get a tree from their categories? or is there a better way?
Share Improve this question asked May 30, 2019 at 18:48 AndrewAndrew 11 Answer
Reset to default 0Hi im not really experienced but I think you could do this with WP_Query. You can do amazing things with it but I dont know how to use it so I cant give example
Edit after the minute I posted this: I think my answer is completely off topic how can I delete it?