Created
June 23, 2015 03:33
-
-
Save webmasterninjay/d60fb35df945fc9f4c8d to your computer and use it in GitHub Desktop.
WP Genesis - Modify Site Title for SEO
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
<?php | |
//* Modify the header URL - HTML5 Version | |
add_filter( 'genesis_seo_title', 'crizelda_header_title', 10, 3 ); | |
function crizelda_header_title( $title, $inside, $tag ) { | |
$tag = ( is_home() || is_front_page() ) ? 'h1' : 'p'; | |
$inside = sprintf( '<a href="%s" title="%s">%s</a>', get_bloginfo('url'), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) ); | |
return sprintf( '<%1$s class="site-title">%2$s</%1$s>', $tag, $inside ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment