I have a situation where I’m open to new thoughts (it is highly probable I’m going about this incorrectly).
My content structure is such – from parent to child..:
1. Battery Category (rechargeable/disposable)
2. Battery (Alkaline/Zinc…)
3. Battery Type (AA, AAA,…)
4. Brand (Panasonic/Energizer…)
There are many types of batteries (Alkaline, Zinc..) and they all could have the common batteries (AA, AAA..) assigned to them and each battery has a brand. So a user would be able to visit a URL like this:
– This page should display all batteries that are Rechargeable AND Alkaline AND are in the brand Panasonic.
Likewise this should work like this as well:
This is my setup
1. I have a page Rechargeable Batteries with sub pages of Alkaline, Zinc
2. I have a flexible Field with Repeater on the Alkaline page to add “Brands” as a single text input, and then in a repeater, add the batteries.
So when I visit: /rechargeable-batteries/alkaline/
I can see the brands. I’m not displaying the batteries under each brand here.
When a user clicks on a brand (/rechargeable-batteries/alkaline/panasonic) they should see the repeater fields under this title for this entry.
I think you can create a custom post type of brands and inside that post type, you can add a repeater field of the Battery Types. This way you can set the URL slug, and it’s accessible as a post. On the Battery subpages, you can add a repeater with Post Object Field in it which is assigned for the Brands custom post type.
I hope this makes sense.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users