Adding a Second Line (Tag Line) to header

I know the BB Theme doesn’t have an option for the second line, or tag line in the theme. I’d like to add it - where should I go to get started on that?

Thanks,
Tom

Ok - I was able to add it by editing the BB core theme code, however, I couldn’t figure out how to set this up in the child theme so that it overrode the core theme and allowed the core theme to be updated.

It seems like it’s fairly easy to add this to the main beaver builder theme. I’d like to put in a request that this be added in the next release of the theme.

On a slightly separate note, how would you suggest I go about adding a widget area to the header?

static public function logo()
{
$logo_type = self::get_setting( ‘fl-logo-type’ );
$logo_image = self::get_setting( ‘fl-logo-image’ );
$logo_retina = self::get_setting( ‘fl-logo-image-retina’ );
$logo_text = self::get_setting( ‘fl-logo-text’ );
$logo_desc = self::get_setting( ‘fl-logo-description’ );
if ( empty( $logo_text ) || $logo_type == ‘image’ ) {
$logo_text = get_bloginfo( ‘name’ );
}

	if ( $logo_type == 'image' ) {
		echo '<img class="fl-logo-img" itemprop="logo" src="'. $logo_image .'"';
		echo ' data-retina="' . $logo_retina . '"';
		echo ' alt="' . esc_attr( $logo_text ) . '" />';
		echo '<meta itemprop="name" content="' . esc_attr( $logo_text ) . '" />';
	}
	else {
		echo '<span class="fl-logo-text" itemprop="name">'. do_shortcode( $logo_text ) .'</span>';

echo ‘<div class=“fl-logo-description” itemprop=“name”>’.do_shortcode($logo_desc) .’</div>’;
}
}

Great question Tom (re tagline).
I’ve wanted this explained! And look forward to the answer.
Purely out of interest, the Divi theme only lets you set a header logo & you have to resort to custom code to turn it off and display the site title and tagliine…
Cheers, Dave

Hey Tom,

Unfortunately, you won’t be able to override that class via child theme. I’ll get the guys in on this thread to see if there is a way to do what you want.

Ben

Hi Ben,

Thanks so much - let me know what they come up with.

Widgets in the header doesn’t seem very necessary now - I discovered the other settings that allow for custom text.

Tom

Hey Tom! Ben’s correct, you can’t override the FLTheme class in a child theme. You can override the theme’s layout/template files, though. Depending on what navigation you have set (bottom, right, centered), you can override those files in your child theme and include the tag line (or a widget) in the markup. Will that solution work for you?

Hey Robby,

Thanks - I was able to edit the nav-bottom.php with the following:

					<a>" itemprop="url"&gt;&lt;?php FLTheme::logo(); ?&gt;</a>

<div class=“fl-desc”><?php echo FLTheme::get_setting( ‘fl-logo-description’ ); ?> </div>

My next question is - how can I add this setting into the customizer?

I was able to overwrite the “fl-header” panel and add it by copying the entirety of customizer-panel-header.php and adding the following section to it:

/* Logo Description */
			'fl-logo-description' =&gt; array(
				'setting'   =&gt; array(
					'default'   =&gt; get_bloginfo('description'),
					'transport' =&gt; 'postMessage'
				),
				'control'   =&gt; array(
					'class'         =&gt; 'WP_Customize_Control',
					'label'         =&gt; __('Logo Text', 'fl-automator'),
					'type'          =&gt; 'text'
				)

It’s not really future proof, however, as it would always overwrite everything in that panel.

Thanks,
Tom

Tom, this might be a bit beyond what we can assist with here via support, but you can add settings to the theme customizer using the native Theme Customizer API. Here’s a link to the codex:

https://codex.wordpress.org/Theme_Customization_API

None of this is specific to the Beaver Builder theme, but it should get ya pointed in the right direction…

Hey Robby,

Okay - thanks. I figured out how to use the WP customizer. I was curious how to use your built in FLCustomizer class to do it. Using WP’s customizer, it doesn’t automatically update the design view - you have to save it and refresh to see the change.

Is it possible to use the FLCustomizer, and will it do what I want?

Thanks,
Tom

In case anyone else was interested, here’s the code to add to the bottom of your functions.php in the child theme folder:

function header_slogan_setting($wp_customize) {

$wp_customize-&gt;add_setting(
  'fl-logo-description',
  array(
	'default'   =&gt; get_bloginfo('description'),
	'transport' =&gt; 'postMessage'
  )
);
$wp_customize-&gt;add_control(  
  'fl-logo-description',  
  array(  
	'section'   =&gt; 'fl-header-logo',  
	'label'     =&gt; 'Site Slogan',  
	'type'      =&gt; 'text',  
	'settings'  =&gt; 'fl-logo-description'  
  )
);

}
add_action( ‘customize_register’, ‘header_slogan_setting’);

Tom, glad you’re making progress! :slight_smile:

The refresh in the customizer window is the default behavior. For live previews, you’ll need to write some Javascript that actually performs the live update. I don’t think using our class will help with that, this is still native WordPress.

Check the section of the codex document labeled: Part 3: Configure Live Preview (Optional)

Thanks - live preview isn’t essential. For some reason I thought if I used your class it would automatically hook it up. I think I’ve got this set up well now.

Thanks,
Tom

Awesome! Glad we could help. Let me know if you have any other questions!