Home › Forums › General Issues › Does hard coding ACF fields increase speed of wordpress? › Reply To: Does hard coding ACF fields increase speed of wordpress?
Hi,
No problem 🙂 Yes the JSON feature is incredibly useful especially for me as a developer to keep fields in sync between enviroments.
Unfortunately it will not improve performance in your theme where you fetch all the posts and their meta values. The get_field (and similar functions) are all basically wrappers for WordPress own functions such as get_post_meta etc. (they do some more stuff like changing the return value and setting up repeaters etc as well).
The information always have to come from the database.. BUT! There is still stuff you can do.
You can for example in some cases see improvement in performance if you use the get_fields
function http://www.advancedcustomfields.com/resources/get_fields/.
Or take it a step further and create your own transients in which you store some values so your visitor don’t have to fetch them dynamically on every page load. https://codex.wordpress.org/Transients_API
And of course caching is important but I’ll assume you have that already!
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.