Home › Forums › ACF PRO › get_fields vs multiple get_field › Reply To: get_fields vs multiple get_field
I go by the first part of that description
You should only use this function when you do not know the fields which which will be appearing on a template…
and the part in bold of the second part
…or if you have a large amount of fields which you would prefer not to code independently.
Since I always know what fields will appear and I prefer to code them independently I don’t use the function. Also, most of the time I don’t want to use a simple loop to display the fields and I’ll likely just need to access the elements of the array instead of using get_field()
where I’ll be using the value.
I might use this for a simple list of field content when the order it’s entered is the order I want to display it in.
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.