Please give your site url
Hi Menaka.
The site is http://besterprivatkredit.de/.
If you go here for example: http://besterprivatkredit.de/bon-kredit/ and check the source code, you’ll see I have
<h1><a class=”site-title” href=”http://besterprivatkredit.de/” title=”Bester Privatkredit
and a little down the line you find
<h1 class=”entry-title format-icon”>Bon Kredit
I only want the last one to show up and get rid of the first h1 tag with site-title. I only want the entry-title to show in h1 on my pages.
Thanks in advance
Please add this to your child theme’s style.css
.tc-header .brand .site-title {
display: none;
}
I did.
Didn’t change anything. It’s still in the style.css so you can see for yourself.
I can see the change. Do refresh your cache.
It is still showing in the source code and I’m still getting a “Duplicate H1 tags” error shown when I run my analysis.
The question is, how do I get rid of it in the source code?
Is there a way – if we can’t eliminate the site-title completely – to change it to h2 or h3, so it doesn’t mess up my H1 tags?
Hi,
To eliminate it, you can add this to your child theme’s functions.php
add_filter( 'tc_site_title_tag', 'my_title_tag' );
function my_title_tag($content) {
return "";
}
To change to h2/h3 add this to your child theme’s functions.php
add_filter( 'tc_site_title_tag', 'my_title_tag' );
function my_title_tag($content) {
return "h2"; //Change to h3 if needed
}
Yay!!!
Thanks a lot, Menaka!
Used the 2nd option because the first showed a “<>” in a line above the site title on the page.
Option 2 works perfectly. Changed it to h3.
Again, I appreciate your time and effort! Thank you!
Glad that it worked.
Can you please mark the post as resolved?