I try to create a filterable list of items (product categories).
There I was unable to create a second relationship filter (roduct category) beneath the «target audience» filter - but that's ok for now.
The categories list must also include two grids of sub-items (products and contact persons) per product category in the table.
This is very important for the customer.
We try to recreate this:
hidden link
You can see the development site here:
hidden link
How can I create a product category listing including the products and contact persons per category?
Hi,
Thank you for contacting us and I'd be happy to assist.
From the screenshot, I'll assume that the 4 items (i.e. 'target audience', 'product category', 'contact person', and 'product') are 4 custom post types, which are connected through multiple post relationships.
If that is correct, please note that you'll be able to use only one post-relationship search filter in a view. This means that if you've created a view to show 'product category' posts, you'll be able to add a post-relationship search field either for the relationship with 'target audience', 'contact person', or 'product' post type, but not for more than one.
Is there any specific reason for using separate post types for these items, and not using custom taxonomies? For items connected through custom taxonomies, you can add custom search field filters for multiple taxonomies.
regards,
Waqar
Hi Waqar
Thanks for your reply. Yes your assumption is right (everything‘s currently set up as custom post types).
Reason is, I just didn‘t knew that there‘s another way of structuring the datas with toolset.
So, I guess I can change «product category» and «target audience» switch to custom taxonomy instead.
Therefore the filter topic should be resolved.
But: more importantly I still need to list the product categories with a sublisting (grid) of all products as well as contact persons connected to it. Can you please help me on this?
Thanks for writing back.
If you'd like to show the list of products, grouped by product categories, you'll need two views, created using the classic/legacy views editor.
1. The parent view will be a taxonomy view, set to show all the terms from the "product categories" taxonomy.
2. And in the loop of the parent taxonomy view, you'll nest a child post view, that will be set to show the 'products' posts, but only connected to the taxonomy term, coming from the loop of the parent taxonomy view.
You'll find more details on the topic of creating grouped lists, in this guide:
https://toolset.com/documentation/legacy-features/views-plugin/using-a-child-view-in-a-taxonomy-view-layout/