Home › Forums › Front-end Issues › Render Field Group Titles on Front End › Reply To: Render Field Group Titles on Front End
Here’s what I did as a work around. I have to believe there is a more elegant way to do this, fewer db calls and such. I’ll have to research this in the future.
Layout of the Entry Post Type:
I took the field key from the first field in the Field Group and ran a prepare_field for each.
add_filter('acf/prepare_field/key=field_58f8d36119412', 'format_entry_header'); // Category One Header
When found, the prepare_field outputs a <div> with my Header Information. This in displayed before the Field and with a little CSS, looks good.
echo '<h3 class="entry-form-title">Maintenance Factors</h3>';
The drawback is that you can not have the fields in a tab or you will get the <div> at the bottom of the first tab AND where intended. Haven’t dug into this much more as I need a solution quickly.
Not sure I should mark this as solved?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.