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

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems