generate_site_title_output

The generate_site_title_output allows allows us to alter the HTML of our site title.

Example

If we don’t want a link surrounding the title:

add_filter( 'generate_site_title_output', function( $output ) {
	return sprintf(
		'<%1$s class="main-title" itemprop="headline">
		    %3$s
		</%1$s>',
		( is_front_page() && is_home() ) ? 'h1' : 'p',
		esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
		get_bloginfo( 'name' )
	);
});