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