[Support request] how can i set my site title (site branding) to an H1

Home Forums Support [Support request] how can i set my site title (site branding) to an H1

Home Forums Support how can i set my site title (site branding) to an H1

  • This topic has 19 replies, 3 voices, and was last updated 7 years ago by Tom.
Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #305207
    Tom
    Lead Developer
    Lead Developer

    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' )
    	);
    }
    #305345
    omer

    didnt work out my site go down !i had to go to cpanel to canael the code .

    it is very strange isnt it ?

    bummer

    #305522
    Tom
    Lead Developer
    Lead Developer

    Where did you add it? Tested and working fine on my test site.

    #305589
    omer

    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 .

    #305590
    Tom
    Lead Developer
    Lead Developer
Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.