• Resolved karsten007

    (@karsten007)


    Hello,

    I can not figure out how to put a tooltip on my header logo.

    Here is my website:

    https://www.kagels-trading.de

    So if you hover the logo “Kagels Trading” you will see the finger, but no text. I would like to add some short title text.

    I know it must be title=”mytext”. But where can I put this title? In the header.php for sure…but where?

    Thank you for support and help.

    Regards,
    Karsten

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello Karsten,
    no, it’s functions.php
    In original functions.php locate alx_site_title() – line 320 or close.
    Since you uploaded a .png image, you should override it in child theme functions.php with something like this:

    function alx_site_title() {
    		// Text or image?
    		if ( ot_get_option('custom-logo') ) {
    			$logo = '<img src="'.ot_get_option('custom-logo').'" alt="'.get_bloginfo('name').'" title="Hello World" >';
    		} else {
    			$logo = get_bloginfo('name');
    		}
    
    		$link = '<a href="'.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;
    }

    It’s “Hello World” + this is “quick hack”, probably can be shortened.
    Regards,
    Mike

    Thread Starter karsten007

    (@karsten007)

    Hi Mike,

    thank you very much for this info. It works. Now I have the tooltip on the header logo.

    I put the complete function code in my childtheme.

    Regards,
    Karsten

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Header logo with tooltip?’ is closed to new replies.