Add CSS to include logo and site title

Hi there,

I am hoping to use the ‘Additional CSS’ feature to add code to allow me to display both the logo and site title to my site. I found this code in other forums. I have added it and it does not appear to be working. Please help!

    .title-logo-wrapper a:after {
    	content: "Site Title";
    	font-size: 30px;
    	display: block;
    }

    .navbar-brand {
    	display: flex;
    	align-items: center;
    }

Hello there,

Try this solution.

Firstly, add this PHP snippet to your child theme’s functions or use Code Snippets plugin if you don’t run any child theme.

    add_action( 'wp_enqueue_scripts', 'moesia_child_site_info', 9999 );
    function moesia_child_site_info() {

      $site_info = array(
        'url'         => get_bloginfo('url'),
        'name'        => get_bloginfo('name'),
        'description' => get_bloginfo('description')
      );

      wp_localize_script( 'moesia-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
    (function($){

     $('.top-bar .site-branding.col-md-4').append('<h1 class="site-title"><a href="'+site_info.url+'">'+site_info.name+'</a></h1><h2 class="site-description">'+site_info.description+'</h2>');

    })(jQuery);
  1. Update

Regards,
Kharis