I need to create this type of relation in Wordpress:
- A Catalog can have many Products
- A Product can have many Catalogs
- A Category can have many Products
- A Product can have only one Category
So when I click on the Catalog, I need to see all the Categories of the Products that I have linked with the Catalog.
E.g:
- Catalog 1 -> Product 1 [Category 1]
- Catalog 1 -> Product 2 [Category 1]
- Catalog 1 -> Product 3 [Category 2]
- Catalog 2 -> Product 2 [Category 1]
So in the frontend, when I click on Catalog 1, I should see the Categories: - Category 1 - Category 2
Then when I click the Category 1 (of Catalog 1) I should see the Products: - Product 1 - Product 2
If I click on Catalog 2, I should see the Categories: - Category 1
Then when I click the Category 1 (of Catalog 2), I should see the Products: - Product 2
How can I rapresent these relations on Wordpress + ACF?