Section Titles
Hello,
Please see the attached images - I have the box option where I can add the section names, but for some reason, they are not showing up? I would like to name each section if possible?
Can anyone help with the above at all?
I don't see your config.php from section:
<?php if ( ! defined( 'FW' ) ) {
die( 'Forbidden' );
}
$cfg = array(
'page_builder' => array(
'title' => __( 'Section', 'domain' ),
'description' => __( 'Add a Section', 'domain' ),
'popup_size' => 'medium',
'title_template' => '{{ if (!o.section_name) { }} {{- title}} {{ } }} {{ if (o.section_name) { }} {{- o.section_name}} {{ } }}',
'type' => 'section' // WARNING: Do not edit this
)
);
Hello,
Please see below:
array( 'title' => __( 'Section', 'the-core' ), 'description' => __( 'Add a Section', 'the-core' ), 'popup_size' => 'medium', 'title_template' => '{{ if (!o.section_name) { }} {{- title}} {{ } }} {{ if (o.section_name) { }} {{- o.section_name}} {{ } }} {{ if (o.background_options.background == "color" && o.background_options.color.background_color.id == "fw-custom") { }} {{ } else if(o.background_options.background == "color"){ }} {{ } }}', 'type' => 'section', // WARNING: Do not edit this 'popup_header_elements' => ''.__('Go to Docs', 'the-core').'', ) );
Do I need to change this?
Can anyone help with the above?
$title_template = '{{-title}}';
$title_template .= '{{ if (o.section_name) { }}';
$title_template .= ' : <strong>{{= o.section_name}}</strong>';
$title_template .= '{{ } }}';
....
'title_template' => $title_template,
@sschristina I gave the working code:
$cfg = array(
'page_builder' => array(
'title' => __( 'Section', 'domain' ),
'description' => __( 'Add a Section', 'domain' ),
'popup_size' => 'medium',
'title_template' => '{{ if (!o.section_name) { }} {{- title}} {{ } }} {{ if (o.section_name) { }} {{- o.section_name}} {{ } }}',
'type' => 'section' // WARNING: Do not edit this
)
);
it is working i'm sure. "section_name" should it must coincide with the setting key for the section name paste it in your section/config.phnp.
Hello,
I have added:
$cfg = array( 'page_builder' => array( 'title' => __( 'Section', 'domain' ), 'description' => __( 'Add a Section', 'domain' ), 'popup_size' => 'medium', 'title_template' => '{{ if (!o.section_name) { }} {{- title}} {{ } }} {{ if (o.section_name) { }} {{- o.section_name}} {{ } }}', 'type' => 'section' // WARNING: Do not edit this ) );
but it has broken the website - please see attached screenshot.

I put the above in the /section/config.php file
did you forget php opening on top of the file?
<?php
I did! Thank you so much :---)