26th Sep '25
/
4 comments

Custom Dynamic Data Tags for ACF Field Label, Prefix and Suffix in Bricks

Bricks does not currently have built-in dynamic tags for outputting labels, 'prepend' and 'append' text for custom fields created using Advanced Custom Fields.

But it does provide

  • bricks/dynamic_tags_list
  • bricks/dynamic_data/render_tag
  • bricks/dynamic_data/render_content

PHP filters using which we can create our own custom data tags.

This Pro tutorial provides the code for registering the following dynamic data tags for use in Bricks editor:

  • {custom_acf_fieldname:label} - shows the field label
  • {custom_acf_fieldname:prefix} - shows the field prefix (prepend value)
  • {custom_acf_fieldname:suffix} - shows the field suffix (append value)

Ex.:

After adding the code:

Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Checking for Post Type in Bricks

Checking for Post Type in Bricks

A way to output elements conditionally based on the current post type in the loop in Bricks.
Categories:
Pro
Programmatically populating ACF field values in WordPress

Programmatically populating ACF field values in WordPress

An example of how to set the values of a Select-type field with the names and labels of all public post types.
Categories:
Pro
Featured Image’s Meta in a Bricks Posts Query Loop

Featured Image’s Meta in a Bricks Posts Query Loop

How to output values of custom fields for the featured image of current post in a query loop
Categories:
Tags:
How to List Your Posts Divided by Categories in Bricks

How to List Your Posts Divided by Categories in Bricks

In this tutorial, we'll learn how to display a list of posts divided by each category. The DOM tree Here is how I structured my…
Categories:
Pro
Events grouped by Event Date custom field in Bricks

Events grouped by Event Date custom field in Bricks

This Pro tutorial for Bricks users provides the steps to output posts of an event custom post type dynamically grouped by the value of their…
Categories:
Pro
Frontend Editing with ACF in Bricks

Frontend Editing with ACF in Bricks

This Pro tutorial provides the steps to show a form on single posts on the front end for admins and the post author using which…
Categories: