Lego2012
12/13/2016 - 3:58 PM

Logo linking to home URL

Logo linking to home URL

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

$logo = '<img src="' . get_stylesheet_directory_uri() . '/images/logo.png" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '">';
 
    printf( '<a href="%s" title="%s">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), $logo );