×
Cyber Monday Sale!
00Days
:
02Hours
:
35Minutes
:
22Seconds
Use Coupon 40%OFF

Includes 1 Year Priority Support

Shop Now

WP SITES

3093 Coded Tutorials & 297 Plugins

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

Was this helpful?

Yes
No
Thanks for your feedback!

Leave a Reply