Site logo

Archived topic

Change site logo link

4 replies · Started by Alfonso on February 11, 2021

Viewing posts 1–5 of 5

Hi there,

I need to edit site logo link, to refresh the current page, how i can do it? Thanks!

Hello. How i can fix the error message?

Hi there,

Can you try this instead?

add_filter( 'generate_logo_output', 'tu_logo_class', 10, 3 );
function tu_logo_class( $output, $logo_url, $html_attr ) {
	printf(
		'<div class="site-logo">
			<a href="%1$s" title="%2$s" rel="home" onclick="location.reload(true);">
				<img %3$s />
			</a>
		</div>',
		'#',
		esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
		$html_attr
	);
}

Let us know how it goes.

This archived topic is closed to new replies.