Categories
Free Tutorials Genesis Tutorials

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

Leave a Reply

Your email address will not be published. Required fields are marked *