Last active
May 8, 2019 16:13
-
-
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)
This file contains 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 | |
/* @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