Support

Account

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!