Support

Account

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.