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 613 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
ACF Date Field Value Custom Format in Bricks

ACF Date Field Value Custom Format in Bricks

In the Bricks forum, a user asks: Hi there, I am setting up an events calendar using bricks. In some circumstances I would like to…
Categories:
Tags:
Conditionally Outputting Elements only for Posts that have a Specific Taxonomy Term

Conditionally Outputting Elements only for Posts that have a Specific Taxonomy Term

Using the core WordPress has_term() function for checking if the current post has a specific term of a given taxonomy.
Categories:
Pro
Related Posts using ACF Post Object in Bricks

Related Posts using ACF Post Object in Bricks

Modifying the query loop to limit the posts to only related posts via an ACF Post Object custom field.
Categories:
Tags:
Pro
Related FAQs on Product pages Based on Product Category Taxonomy in Bricks

Related FAQs on Product pages Based on Product Category Taxonomy in Bricks

On product pages, we show all the FAQs associated with the current WooCommerce product's product categories.
Categories:
Pro
ACF Relationship Select Filter in Bricks

ACF Relationship Select Filter in Bricks

In the BricksLabs Facebook group, a user asks: I'm learning about ACF relationships and attempting to output a list of posts on any given page,…
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:
How to conditionally load your scripts based on an ACF field

How to conditionally load your scripts based on an ACF field

This tutorial provides the PHP codes that can be pasted in order to enqueue your scripts conditionally based on the value of an ACF field…
Categories: