Hi, I wonder if someone could help me think this through…
I am building a site in which a custom post type, Quotes, will contain quotes from users, originating on other sites around the web.
I am making an ACF field group for the Quotes post type…
Characteristics of a Quote post would include…
I know how I’d build an easy ACF field group for that.
But here’s the interesting thing…
For fields like “Publication name”, “Author name” and “Related stories ID”, these is going to be a high degree of commonality in the values across my Quotes posts.
eg. Many users may have a Quote originating in a “Publication name” of “Washington Post”. eg. Many users may have a Quote with a “Related stories ID” of 3527618.
I don’t think it’s efficient for me to have to store all of these common values as though they were distinct. But that’s what ACF fields like “Text” and “Number” would have me do.
So, is there a way I can keep, say, a central repository of “Publication names”, “Related stories IDs” etc so that, when a Quote should have a “Publication name” of “Washington Post”, that entity would be linked to it from the list?
Perhaps you can guess the next step… I would then like to be able to be able to output all Quotes posts associated with a distinct “Publication name” (eg. “Washington Post”) or “Related stories ID” (eg. “3527618”).
So far, I’m imagining I could keep a taxonomy of “Publication names” and add custom meta to that.
But I don’t know if that’s the best idea. Nor does it seem sensible for a field like “Related stories ID”.
Perhaps the ACF “Select” field is useful?
I can see the ACF “Relationship” field, and it feels like that should be useful, but I don’t know how I’d make use of it.
Hope I’ve communicated this effectively.
one important question is, are the user entering their quite themselves or the site’s admin is going to do it.
If it’s the site admin, then i’d say it’s save to create three custom taxonomies for “publication name”, “related stories ID” and “publication author”.
If you just don’t like how the taxonomy meta box is on the sidebar. you can set the taxonomy “public” value to false when you registering, and use acf’s taxonomy field in stead.
1) it’s be faster to query the quote under “publication name” instead of checking against the meta table
2) because they are taxonomy, you can check the existing ones or add new one on the fly.
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!