Archived topic
how can i set my site title (site branding) to an H1
19 replies · Started by omer on April 11, 2017
Viewing posts 16–20 of 20
Ah I see the problem.
Try adding this function:
add_filter( 'generate_site_title_output','tu_blog_h1_title' );
function tu_blog_h1_title() {
printf(
'<%1$s class="main-title" itemprop="headline">
<a href="%2$s" rel="home">
%3$s
</a>
</%1$s>',
( is_home() ) ? 'h1' : 'p',
esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ),
get_bloginfo( 'name' )
);
}
didnt work out my site go down !i had to go to cpanel to canael the code .
it is very strange isnt it ?
bummer
Where did you add it? Tested and working fine on my test site.
i have the child theme :
so i inert the code first on the style.css and nothing happened .
then i insert it in the function.php and my site go down .
Try using a plugin like this: https://en-ca.wordpress.org/plugins/code-snippets/
This archived topic is closed to new replies.