• Replace

    <img src="<?php echo esc_url( $header->url ); ?>" height="<?php echo esc_attr( $header->height ); ?>" width="<?php echo esc_attr( $header->width ); ?>" alt="" />

    with

    <img src="<?php echo esc_url( $header->url ); ?>" height="<?php echo esc_attr( $header->height ); ?>" width="<?php echo esc_attr( $header->width ); ?>" alt="<?php bloginfo( 'name' );?>" />

    This adds the site title as the alt text for whatever logo is added.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Ted Thompson

    (@yorokobi)

    Thread Starter Ted Thompson

    (@yorokobi)

    That had validation issues… This one is better

    <img src="<?php echo esc_url( $header->url ); ?>" height="<?php echo esc_attr( $header->height ); ?>" width="<?php echo esc_attr( $header->width ); ?>" alt="<?php bloginfo( 'name' ); ?>" /></a><a href="<?php echo home_url(); ?>" class="hidden"><?php bloginfo( 'name' ); ?>

    It adds the alt tag, and prvides a hidden text for the site name, which is important for text browsers, readers, and spiders.

    Theme Author silverks

    (@silverks)

    Thanks for the suggestion. We’ll add the alt text for the header image in the next update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Suggestion for "inc/header.php"’ is closed to new replies.