Skip to content

Instantly share code, notes, and snippets.

@anythinggraphic
Last active May 8, 2019 16:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anythinggraphic/c3318907364ce9d213ff009780ec35b8 to your computer and use it in GitHub Desktop.
Save anythinggraphic/c3318907364ce9d213ff009780ec35b8 to your computer and use it in GitHub Desktop.
Change the header logo link in Genesis (Updated for new themes that support HTML5 and schema rich snippets)
<?php
/* @link https://anythinggraphic.net/change-header-logo-link-in-genesis-updated-for-html5-schema/
/* Updated from Bill Erickson's original post http://www.billerickson.net/code/genesis-change-logo-url to include support for new HTML5 themes and schema rich snippets.
/* Change header logo link in Genesis
----------------------------------------------------------------------------------------*/
add_filter('genesis_seo_title', 'ag_change_logo_url', 10, 3 );
function ag_change_logo_url( $title, $inside, $wrap ) {
$inside = sprintf( '<a href="%s" title="%s">%s</a>', esc_url( 'http://nmbree.org' ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
$title = sprintf( '<%s class="site-title" itemscope="headline">%s</%s>', $wrap, $inside, $wrap );
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment