Both logo and site tile in Talon theme


#1

Hello! Is there a way I can have both site title and site logo in the Talon theme?
Thanks in advance :slight_smile:


#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:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. 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>')

    });
  1. Update

Regards,
Kharis


#3

OOoh, thank you, it works! I have to ask another thing :slight_smile: Is there a way to rearrange them, to have the logo left and the title on the right?
Thanks again!


#4

Hello there,

Try adding this CSS code to Appearance > Customize > Additional CSS from dashboard.

    .site-branding .custom-logo-link {
      float: left;
    }

Regards,
Kharis


#5

Oh wow, I missed this message, I’m so sorry! And thank you for the help, it worked!!! Although this solution lessened the space for the site title, which is now awkwardly divided into three lines. Is there a way I can move the logo more to the left of the header area? I wasn’t successful with trying to change the padding/margins on the header and/or logo area… Here’s a screenshot for better understanding. Thank you!