Skip to content

Instantly share code, notes, and snippets.

@jrstaatsiii
Forked from pdewouters/gist:5391496
Created August 13, 2013 16:48
Show Gist options
  • Save jrstaatsiii/6223126 to your computer and use it in GitHub Desktop.
Save jrstaatsiii/6223126 to your computer and use it in GitHub Desktop.
/**
* Use an img tag for the logo
* @param $title
* @param $inside
* @param $wrap
*
* @return string
*/
function ssm_modify_site_title_html( $title, $inside, $wrap ) {
$wrap = ( is_home() || is_front_page() || is_archive() ) && !is_post_type_archive('product') && 'title' == genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p';
/** Set what goes inside the wrapping tags */
$inside = sprintf( '<a href="%s"><img width="259" height="84" src="%s" alt="%s" /></a>', trailingslashit( home_url() ), get_stylesheet_directory_uri() . '/images/logo.png', get_bloginfo( 'name' ) );
/** Build the Title */
$title = sprintf( '<%s id="title">%s</%s>', $wrap, $inside, $wrap );
return $title;
}
add_filter( 'genesis_seo_title', 'ssm_modify_site_title_html', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment