Hello! Is there a way I can have both site title and site logo in the Talon theme?
Thanks in advance
Both logo and site tile in Talon theme
Addie
#1
kharisblank
#2
Hello there,
To accomplish it, firstly add this snippet to your child themeโs functions. Or use a plugin that allows the same purpose like Functionality.
/**
* Get site title and description
*/
add_action( 'wp_enqueue_scripts', 'talon_child_site_info', 9999 );
function talon_child_site_info() {
$site_info = array(
'name' => get_bloginfo('name'),
'description' => get_bloginfo('description')
);
wp_localize_script( 'talon-scripts', 'site_info', $site_info );
}
Then do the below steps:
- Install and activate the TC Custom JavaScript plugin
- Go To Appearance > Custom JavaScript
- Paste the following code into the provided box
jQuery(function($) {
$('.site-branding').append('<h1 class="site-title">'+site_info.name+'</h1><p class="site-description">'+site_info.description+'</p>')
});
- Update
Regards,
Kharis
Addie
#3
OOoh, thank you, it works! I have to ask another thing Is there a way to rearrange them, to have the logo left and the title on the right?
Thanks again!
kharisblank
#4
Hello there,
Try adding this CSS code to Appearance > Customize > Additional CSS from dashboard.
.site-branding .custom-logo-link {
float: left;
}
Regards,
Kharis