Just curious to add a couple of things/questions here…
1. Does the code I have used above match the kind of suggestion you had given the circumstances?
(To convey a company type, I have weighed up using either 1) a taxonomy, linked to the company term via an ACF field, or 2) just an ACF field itself. My code above uses a taxonomy).
2. I’m now considering that the “company type” descriptor may actually need to be multiple…
In other words, I may have available multiple source pieces of data with which to describe my companies…
I am now considering that, if I choose to use them all, this is clearly too much to fit in to one “company type” as taxonomy.
So I am now considering going back to baking the company descriptive field/s in to the company term itself as ACF fields, and not using a separate “company type” taxonomy…
I had initially believed that doing it that way would make the looping slower.
But, since I am already currently linking that taxonomy to a term using an ACF field anyway, maybe there is no impact to just pulling that data from term meta (ACF fields on “company”) when it’s open (?).
I will still want to output posts by company type in various ways. I’d value discussing this…
It seems that using a taxonomy to describe “company type” gives the natural advantage of spinning up template pages (eg. taxonomy-orgtype-agency.php to output posts for all “agency” companies).
If I move to storing all “company type” fields as ACF fields against “company” terms themselves, how would I go about grouping output of posts per company type?
To simplify that question – say I have 200 ‘company” terms with a Checkbox “org_tag” value of “agency”. How do you output only those? …
Because, unlike a taxonomy, I assume there is no relation between entities with the same value? Is there an ACF field that does have this relational database-ability? Leaving aside the Relationship, which seems to want a relationship with a Post.
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!
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.