Updated on 28 Jul 2024
This Pro tutorial provides the steps to output the text of layout labels and/or sub field labels when using the Flexible Content field of Advanced Custom Fields Pro.
Consider this sample field group:
Generally speaking, it is okay to hardcode these texts, but there could be some situations where you want to pull the labels dynamically. This means that if the labels are changed in the field group, the labels will automatically update on the front end without having to manually change the labels in the template/builder to match the updated text.
Update: A JSON export of the field group and JSON code of the fully-built Section from our dev site are provided near the end.
Layout Labels
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