krista-m
6/30/2018 - 1:11 PM

Add logo next to site title

Add logo or image next to site title or name. This logo can be easily changed out on different pages (based on header background colors) through CSS.

.site-logo {
	background: url( 'images/logo.png' ); /* logo.png has to be in images file...or be smart and use Customizer */
	display: inline-block;
	width: 50px;
	height: 50px;
	margin-right: 10px;
}

.site-logo::after {
	content: " ";
	height: 100%;
	display: inline-block;
	vertical-align: middle;
}
add_filter( 'genesis_seo_title', 'filter_krstarter_front_page_site_title_html' );
function filter_krstarter_front_page_site_title_html( $html ) {

	$site_name = get_bloginfo( 'name' );
	$new_html = '<span class="site-logo"></span>' . $site_name;
	
	$html = str_replace( $site_name, $new_html, $html );
	
	return $html;
	
}

genesis(); /* only need this if it's a new file */