Skip to content

Instantly share code, notes, and snippets.

@webmasterninjay
Created June 23, 2015 03:33
Show Gist options
  • Save webmasterninjay/d60fb35df945fc9f4c8d to your computer and use it in GitHub Desktop.
Save webmasterninjay/d60fb35df945fc9f4c8d to your computer and use it in GitHub Desktop.
WP Genesis - Modify Site Title for SEO
<?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