Site logo

Archived topic

Need to add height and width attributes to existing snippets

1 reply · Started by Forum User on March 31, 2021

Viewing posts 1–2 of 2

I am trying to add the height and width attributes to an existing snippet below for my header logo for Googles Core Web Vitals.

add_filter( 'generate_logo_output', 'tu_logo_target', 10, 3 );
function tu_logo_target( $output, $logo_url, $html_attr ) {
	printf(
		'<div class="site-logo">
			<a href="%1$s" title="hypnosis nyc hypnotherapy New York City" rel="home" rel="noopener" alt="Hypnotherapy NYC Hypnosis Center #1 Doctor Referred Hypnotist">
				<img %3$s />
			</a>
		</div>',
		esc_url( apply_filters( 'generate_logo_href' , "tel:1-877-800-6443" ) ),
		esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
		$html_attr
	);
}
This archived topic is closed to new replies.