Skip to content

Instantly share code, notes, and snippets.

@davidmottershead
Created June 23, 2014 20:06
Show Gist options
  • Save davidmottershead/2456884ef317f9d73cc6 to your computer and use it in GitHub Desktop.
Save davidmottershead/2456884ef317f9d73cc6 to your computer and use it in GitHub Desktop.
Filter function to modify genesis_seo_title and place an icon before the site title http://www.davidmottershead.com/articles/icon-site-title-genesis/
add_filter( 'genesis_seo_title','custom_genesis_seo_title',10,1);
function custom_genesis_seo_title ($title) {
$inside = sprintf( '<a href="%s" title="%s">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
if (is_front_page()||is_home())
{
$title = '<h1 class="site-title" itemprop="name"><span class="icon-home2"></span>'. $inside .'</h1>';
}
else
{
$title = '<p class="site-title"><span class="icon-home2"></span>'. $inside .'</p>';
}
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment