Skip to content

Instantly share code, notes, and snippets.

@feastdesignco
Last active June 14, 2018 13:02
Show Gist options
  • Save feastdesignco/079aff0e24789e268d5ba12162a054e1 to your computer and use it in GitHub Desktop.
Save feastdesignco/079aff0e24789e268d5ba12162a054e1 to your computer and use it in GitHub Desktop.
Change the default genesis_seo_title
/**
* 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
* Original credit http://blackhillswebworks.com/?p=4144
* Add to feast-customizations-plugin to preserve change during updates, not functions.php
*
*/
add_filter( 'genesis_seo_title', 'feast_filter_genesis_seo_site_title', 10, 2 );
function feast_filter_genesis_seo_site_title( $title, $inside ){
$child_inside = sprintf( '<a href="%s" title="%s"><img src="'. get_header_image() .'" 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