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..

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:
Pro
Media File Attachment Data in Bricks

Media File Attachment Data in Bricks

With a 'Media' query loop, this tutorial shows how we can retrieve various attachment-specific properties inside of the loop.
Categories:
Pro
ACF Font Awesome Field in Bricks

ACF Font Awesome Field in Bricks

We walk through using the Advanced Custom Fields: Font Awesome Field plugin for showing Font Awesome icons.
Categories:
Tags:
ACF Repeater Sub Field Values as Tabs in Bricks

ACF Repeater Sub Field Values as Tabs in Bricks

Bricks' query loop supports ACF Repeaters and Meta Box Groups out of the box besides posts, users and terms. This tutorial shows how we can…
Categories:
Tags:
Pro
ACF Flexible Content Field – Layout Labels and Sub Field Labels

ACF Flexible Content Field – Layout Labels and Sub Field Labels

How to output the text of layout labels and/or sub field labels using the Flexible Content field of ACF Pro.
Categories:
Pro
ACF Image Data in Bricks

ACF Image Data in Bricks

Displaying Alt text, Caption, Title and URL of an ACF image field for posts in a query loop.
Categories:
Tags: