WordPress plugin intelligence profile

Field Helper Functions For ACF Pro

A collection of helper functions to make working with Advanced Custom Fields Pro in your WordPress themes even easier.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 6.8
Current version1.1.0
WordPress coverageTested up to WordPress 6.8
Minimum stackWP 5.0 · PHP 7.4
Directory statusactive
Last directory update10 Aug 20251y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Field Helper Functions For ACF Pro version 1.1.0 as active, updated 1y ago and tested up to WordPress 6.8.

Overview

About this plugin

This plugin provides a set of simple, powerful helper functions to reduce boilerplate code and streamline the process of retrieving and displaying ACF field values in your templates. It includes helpers for getting single values (with support for nested groups), and for easily looping over repeater fields. The plugin is built with security and best practices in mind, ensuring that all output can be properly escaped.

Features:

  • get_acf(): A versatile function to get any field value. It supports dot notation for nested group fields and automatically handles get_sub_field() context within repeaters.
  • repeater(): A clean way to loop through repeater fields with callbacks. Includes optional callbacks for before and after the main loop, and allows passing an arguments array to the row callback. (Requires ACF Pro)
  • get_repeater_field(): Fetch a specific sub-field value from a specific row, or an array of all values for a sub-field across all rows. (Requires ACF Pro)
  • Lightweight and secure.
  • Logs to the PHP error log for easy debugging.

Usage Examples:

get_acf()

This is your main function for retrieving any ACF field value.

-

Basic Usage: Get the value of a text field named page_headline.

></h1>

-

Providing a Default Value: If the page_subtitle field might be empty, provide a fallback.

></h2>

-

Escaping HTML: When outputting a value inside an HTML attribute, always escape it.

" alt="'. $alt_text. "'>";

Other escape options: html, url, js, text.

-

Getting a Value from an Options Page: To get a field value from an ACF Options Page, pass option as the $post_id.

php $footer_copyright = get_acf('footer_copyright_text', '', 'html', 'option');

-

Getting a Value from a Nested Group Field: Use dot notation to access fields inside a group.

phone_number');

-

Automatic Sub Field Usage: Inside a standard ACF have_rows loop, get_acf() automatically uses get_sub_field() so you don’t have to change your function calls.

php if (have_rows('team_members')): while (have_rows('team_members')): the_row(); // This correctly gets the 'member_name' sub field for the current row. echo '<h3>'. get_acf('member_name', '', 'html').

'</h3>'; endwhile; endif;

repeater() (ACF Pro Only)

This function simplifies looping over repeater fields.

-

Basic Repeater Loop: To display a list of testimonials from a repeater named testimonials with a sub-field testimonial_text:

php repeater('testimonials', function($index) { echo '<blockquote>'. get_acf('testimonial_text', '', 'html'). '</blockquote>'; });

-

Using Before and After Callbacks: To wrap your repeater output in <ul> and <li> tags.

php repeater( 'service_list', function($index) { // Main row callback echo '<li>'. get_acf('service_name'). '</li>'; }, [], // No args needed for this example function() { // Before callback echo '<ul>'; }, function() { // After callback echo '</ul>'; } );

-

Passing Arguments to the Callback: To make your repeater template more reusable, pass in arguments.

php $args = [ 'item_class' => 'faq-item', 'heading_level' => 'h3' ];

repeater( 'faqs', function($index, $args) { printf('<div class="%s">', esc_attr($args['item_class']));

printf( '<%s>%s</%s>', esc_attr($args['heading_level']), esc_html(get_acf('question')), esc_attr($args['heading_level']) );

echo '<div>'. get_acf('answer', '', 'html'). '</div></div>'; }, $args );

get_repeater_field() (ACF Pro Only)

Use this to get data from a repeater field without looping through it manually.

-

Get All Values from a Sub-Field:

]

echo '<p>Total attendees: '. count($all_attendees). '</p>';

-

Get a Value from a Specific Row:

php // Row index is 0-based, so 2 is the third row. $third_image = get_repeater_field('slider', 'slide_image', 2);

if ($third_image) { // $third_image will contain the image array/ID from ACF echo wp_get_attachment_image($third_image, 'large'); }

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • advanced custom fields
  • acf
  • development
  • utilities
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 6.8

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 6.8.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to6.8
Minimum requirementsWordPress 5.0 · PHP 7.4
Update activity10 Aug 20251y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.