AgilePress Content Block for ACF

plugin banner

Display ACF fields, Repeaters, and Galleries on the frontend using simple HTML. No PHP coding required.

Author:AgilePress (profile at wordpress.org)
WordPress version required:6.1
WordPress version tested:6.9.1
Plugin version:1.1.0
Added to WordPress repository:12-12-2025
Last updated:13-02-2026
Rating, %:0
Rated by:0
Plugin URI:
Total downloads:104
plugin download
Click to start download

AgilePress Content Block for ACF is a versatile tool developed by AgilePress that allows you to create dynamic HTML content with Advanced Custom Fields integration. It supports four powerful syntaxes for different ACF field types:

  • Simple fields: Use {field_name} for text, number, and other simple fields
  • Group fields: Use {group_name:sub_field_name} to access fields within ACF groups
  • Repeaters & Galleries: Use {{repeater_name}} HTML content with {sub_field} tags {{/repeater_name}} to loop through repeater fields and image galleries
  • Conditionals: Use {{#if field}}...{{/if}} for conditional content display with support for = and != comparisons

This block is perfect for:

  • Displaying custom field data in formatted HTML
  • Creating dynamic templates with ACF fields
  • Building complex layouts that pull data from custom fields
  • Looping through repeater fields and image galleries
  • Accessing nested group field data
  • Showing/hiding content based on field values
  • Integrating ACF data seamlessly into your content

The block provides an intuitive sidebar editor where you can write HTML and insert ACF field tags. On the frontend, these tags are automatically replaced with the actual values from your Advanced Custom Fields.

Requirements:

  • Advanced Custom Fields (free or PRO version)
  • WordPress 6.1 or higher
  • PHP 7.0 or higher

Usage Examples

Example 1 – Simple field display:

<div class="location">
  <p>Latitude: {latitude}</p>
  <p>Longitude: {longitude}</p>
</div>

Example 2 – Group field access:

<div class="contact">
  <h3>{contact_info:name}</h3>
  <p>Email: <a href="mailto:{contact_info:email}">{contact_info:email}</a></p>
  <p>Phone: {contact_info:phone}</p>
</div>

Example 3 – Repeater field loop:

<ul class="team-members">
  {{team_member}}
    <li>
      <h4>{name}</h4>
      <p>{position}</p>
      <p>{bio}</p>
    </li>
  {{/team_member}}
</ul>

Example 4 – Gallery field loop:

<div class="gallery">
  {{project_images}}
    <figure>
      <img src="{url}" alt="{alt}" width="{width}" height="{height}" />
      <figcaption>{caption}</figcaption>
    </figure>
  {{/project_images}}
</div>

Example 5 – Conditional display:

<article class="post">
  {{#if featured}}
    <span class="badge">Featured</span>
  {{/if}}

  <h2>{title}</h2>

  {{#if status = published}}
    <p class="published-date">Published: {date}</p>
  {{#elseif status = draft}}
    <p class="draft-notice">This is a draft</p>
  {{#else}}
    <p class="pending-notice">Pending review</p>
  {{/if}}

  {{#if author_name != Anonymous}}
    <p>By {author_name}</p>
  {{/if}}
</article>

Example 6 – Complex combination:

<article class="project">
  <header>
    {{#if is_featured}}
      <span class="featured-badge">Featured Project</span>
    {{/if}}

    <h2>{project_title}</h2>
    <p class="meta">
      Location: {location:city}, {location:country}<br>
      Date: {project_date}
    </p>
  </header>

  <div class="gallery">
    {{project_gallery}}
      <figure>
        <img src="{url}" alt="{alt}" loading="lazy" />
        <figcaption>{caption}</figcaption>
      </figure>
    {{/project_gallery}}
  </div>

  {{#if features}}
    <div class="features">
      <h3>Project Features</h3>
      <ul>
        {{features}}
          <li>
            <strong>{feature_name}:</strong> {feature_value}
          </li>
        {{/features}}
      </ul>
    </div>
  {{/if}}

  <footer>
    {{#if client_type = commercial}}
      <p><strong>Commercial Project</strong></p>
    {{/if}}

    <p>Client: {client_info:company_name}</p>

    {{#if client_info:email != none}}
      <p>Contact: {client_info:email}</p>
    {{/if}}
  </footer>
</article><h3>Additional Information</h3>

Security:
All field values are properly escaped using WordPress security functions (esc_html(), esc_url(), wp_kses_post()) to prevent XSS attacks and ensure safe output.

Performance:
The block uses WordPress native functions and ACF’s optimized field retrieval methods. Field values are processed server-side during render, ensuring optimal frontend performance.

Compatibility:

  • WordPress 6.1+ (tested up to 6.9)
  • PHP 7.0+ (tested up to 8.3)
  • ACF free version 5.0+
  • ACF PRO 5.0+
  • Classic and Block themes

Developer Notes:
The block follows WordPress coding standards and uses


FAQ
ChangeLog