Skip to content

Instantly share code, notes, and snippets.

@alexadark
Forked from bhwebworks/add to functions.php
Created July 27, 2014 12:56
Show Gist options
  • Save alexadark/b466440e245507bdc9e2 to your computer and use it in GitHub Desktop.
Save alexadark/b466440e245507bdc9e2 to your computer and use it in GitHub Desktop.
/**
* Filter the genesis_seo_site_title function to use an image for the logo instead of a background image
*
* The genesis_seo_site_title function is located in genesis/lib/structure/header.php
* @link http://blackhillswebworks.com/?p=4144
*
*/
add_filter( 'genesis_seo_title', 'bhww_filter_genesis_seo_site_title', 10, 2 );
function bhww_filter_genesis_seo_site_title( $title, $inside ){
$child_inside = sprintf( '<a href="%s" title="%s"><img src="'. get_stylesheet_directory_uri() .'/images/logo.png" title="%s" alt="%s"/></a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ) );
$title = str_replace( $inside, $child_inside, $title );
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment