Home › Forums › General Issues › Efficient use of get_field › Reply To: Efficient use of get_field
Hi @willryanuk
I think what you have is fine. Providing the post_id as the second parameter is sliiiiiighly faster than omitting it since otherwise ACF will use get_the_ID() to fetch the global post id. So it skips that if you provide the post id yourself.
However if you’re pretty much fetching all the meta you might as well use get_fields since it will only call to get_post_meta (or similar function) once.
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.