• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Using get_post_meta In Replace of ACF Repeater Sub Field Functions

By default, the Advanced Custom Fields plugin uses the_sub_field() function to output the value of a sub field from a repeater field you create using ACF Repeater Sub Fields as seen in this screenshot :

ACF Repeater Sub Field

The default code used to output the value for your repeater sub fields looks something like this :

However, rather than use ACF specific functions like the_sub_field() and get_sub_field(), you can use WordPress custom fields function get_post_meta() like this to do exactly the same thing :

Credit to John Huebner for posting this code on the ACF forums back in 2014.

Related Tutorials

  • Genesis Template For ACF Repeater Fields
  • How To Use Advanced Custom Fields With Non ACF Functions For Images

Custom Fields

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.