Created
June 23, 2014 20:06
-
-
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/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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