Support » Fixing WordPress » text display my logo mouse over

  • Resolved fifthhouse

    (@fifthhouse)


    When I mouse over my site logo, I would like to be able to have some text appear, with a brief description of my logo. Is there a way to do this?

    My logo image is in my theme images folder in my wp content folder.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi there,

    It depends on how fancy you want that description to look like.
    Normally, if you add a ‘title’ attribute to your logo image or link, it will be displayed by the browser on mouse over.
    Your logo is probably called from your theme’s index.php file. Your best bet is to print your site’s description that is defined in the WP admin theme directly in the site. To do that, once you locate where the logo is called from, add the following code to the <a> or <img> tag:
    title="<?php echo bloginfo('description'); ?>"
    That should do the trick.
    If you want something more fancy, you can wrap your logo inside a container div tag, add a div or span inside that div after the logo, and use CSS position and display parameters. If you have no idea what I’m talking about, just let me know and I’ll tell you how to do it.

    Good luck!

    Hi Marventus, Thanks for your help. My logo is called from in my header.php file. I found this code:

    [Please post code snippets between backticks or use the code button.]

    which might be where you mean for me to put the code you offered. I tried a lot of things but wasn’t able to get a result. I don’t know how exactly to place the additional code in and was wondering if you could tell me where it should go?

    here is the code:

    <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/img/logo.jpg" /></a>
    					</span>
    				</<?php echo $heading_tag; ?>>
    				<div id="site-description"><?php bloginfo( 'description' ); ?>

    Hello again,

    Your code for the logo link should be:
    <a href="<?php echo home_url( '/' ); ?>" title="<?php echo bloginfo ('description'); ?>" rel="home"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/img/logo.jpg" /></a>
    That will display the site description provided in your WP Admin Panel each time one hovers over your logo.
    If you arre looking for something fancier, LMK.
    Cheers!

    Thanks again for your help. I installed the code, and it still displays the same thing, which is my site title. Actually I don’t have anything in my wp admin panels called site description, maybe that’s the problem. I have a site description in the ‘all in one seo’ plugin, but that description isn’t displaying either.

    Michael

    (@alchymyth)

    Forum Moderator

    when i hover the linked title logo of the site linked to your username, i get the text of the site description which is from the ‘tag line’ in ‘settings’ ‘general’

    if you want some ‘hand-made’ text, change this section of @marventus‘ suggestion:
    title="<?php echo bloginfo ('description'); ?>"
    to:
    title="hand-written logo description text"

    Thank you! OK that makes sense. I didn’t know the tagline was the site description.

    Much appreciation to you both 🙂

    Hey,

    Sorry I couldn’t get back to you earlier. I’m glad you were able to figure it out.
    Thanks for your help, Alchymyth.
    Good luck to the both of you!

    Hello,

    If you were able to figure this out, would you please mark this thread as resolved?

    Thanks a lot!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘text display my logo mouse over’ is closed to new replies.