Home › Forums › General Issues › How would you handle this? A legion of regions.
Hi folks, how would you handle this weird request?
I want to create fields for a bunch of locations that have a few fields in common.
Kind of like this:
Region 1
[] Name
[] Event Date
[] Featured?
[] Link
Region 2
[] Name
[] Event Date
[] Featured?
[] Link
Region 3
[] Name
[] Event Date
[] Featured?
[] Link
...
Region 60
[] Name
[] Event Date
[] Featured?
[] Link
Now you might think that a repeater field is the way to go, and you might be right.
However, but there are a few special requirements:
What would you do?
I’m fairly familiar with using ACF, but I keep coming up with clumsy solutions to this problem.
So I’m wondering:
Because you are almost certainly smarter than me, do you have a recommended solution for this?
Thank you for any advice!
Given the information you provided, I would look at using a custom post type and not a repeater.
Thanks, John. I hadn’t thought of that.
What do you think the advantages would be if we loop through posts of a custom post type, rather then looping through repeater fields?
Having 60 rows in a repeater will likely be an issue unless you increase php max_input_vars.
Using a CPT will allow for and unknown future enhancement. If you use a repeater it will be more difficult to make changes.
Repeaters are difficult to search/filter and they are difficult to put in some order other than the order they are entered. Repeaters have their place, I just don’t feel that it for large data sets.
Thank you, John. I appreciate your advice.
You made excellent points here.
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
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.