• Resolved Henke75

    (@henke75)


    Hi Alex, awesome themes, you do great work

    Is there any way to show the logo and the site title, I’ve ticked the “Display site title and Tagline” but I’m only getting the logo and Tagline

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous User 16453565

    (@anonymized-16453565)

    Hey @henke75,

    To do that in a proper way you have to create a child theme of your currently active theme and make customization in your function.php.

    For that open your function.php file and find kontrast_site_title() function and replace that code from below code.

    /*  Site name/logo
    /* ------------------------------------ */
    if ( ! function_exists( 'kontrast_site_title' ) ) {
    
    	function kontrast_site_title() {
    
    		$custom_logo_id = get_theme_mod( 'custom_logo' );
    		$logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
    
    		// Text or image?
    		if ( has_custom_logo() && get_bloginfo('name') ) {
    			$logo = '<img src="'. esc_url( $logo[0] ) .'" alt="'.esc_attr( get_bloginfo('name')).'">' . esc_html( get_bloginfo('name') );
    		} elseif (has_custom_logo()) {
    			$logo = '<img src="'. esc_url( $logo[0] ) .'" alt="'.esc_attr( get_bloginfo('name')).'">';
    		} else {
    			$logo = esc_html( get_bloginfo('name') );
    		}
    
    		$link = '<a href="'.esc_url( home_url('/') ).'" rel="home">'.$logo.'</a>';
    
    		if ( is_front_page() || is_home() ) {
    			$sitename = '<h1 class="site-title">'.$link.'</h1>'."\n";
    		} else {
    			$sitename = '<p class="site-title">'.$link.'</p>'."\n";
    		}
    
    		return $sitename;
    	}
    
    }

    Let me know if that does it.

    And you can also do this using below css code in Appearance → Customize → Additional CSS:

    .site-title a:after {
      content: 'Your Company name';
      font-size: 34px;
      color: black;
    }

    But this is not the ideal way.

    Hope above things help you to solve your requirements.

    Thank you.

    Thread Starter Henke75

    (@henke75)

    Thank you Snehal, worked a treat

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show title and logo’ is closed to new replies.