Support

Account

Home Forums Add-ons Flexible Content Field Dynamic title for flexible content pane? Reply To: Dynamic title for flexible content pane?

  • I think you’re looking for the acf/fields/flexible_content/layout_title filter. Assuming the name on that Title dropdown is just ‘title’ I think this should do it?

    
    add_filter('acf/fields/flexible_content/layout_title', function($title) {
        $ret = $title;
        if ($custom_title = get_sub_field('title')) {
            $ret = sprintf('<strong>%s</strong> <em style="font-size: 80%; opacity: 0.5">%s</em>', $custom_title, $title);
        }
    
        return $ret;
    });