WordPress.org

Ready to get started?Download WordPress

Forums

[Twenty Eleven] Any Way to Get Titles to Show in Header Pix? (7 posts)

  1. Lane Lester
    Member
    Posted 2 years ago #

    In most photos, the Title or Alt Text pops up when the mouse is hovered over the photo. This does not happen with the photos that cycle as header graphics.

    Is there any way to get this text to show up as popups?

    Lane

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    You would need to start by creating a child theme and then creating a modified header.php template file in your new child theme.

  3. Lane Lester
    Member
    Posted 2 years ago #

    Thanks, esmi. I already have a child theme for other changes I've made. Looking at header.php, it seems this is the line that displays the header graphics:
    <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />

    But I confess I still don't know how to accomplish my goal.

    Lane

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    What text were you hoping to show as the title/alt text bearing in mind that the latter is intended to be used when the image isn't available or viewable?

  5. LaneLester
    Member
    Posted 2 years ago #

    I have a set of scenery photos, and I would like to display the names of the locations.

    Lane

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    This would be possible if you're using the featured image functionality to create a custom header image per page but not if you're just uploading images via Appearance -> Header.

  7. Lane Lester
    Member
    Posted 2 years ago #

    OK, thanks. I think I'll throw in the towel on that one. If it becomes essential to have a label, I'll just edit the graphic to have the label.

    Lane

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.