Hello guys,
I have been enjoying using this theme, it’s great.
Recently I started a blog section in my website and currently only have two posts. Hower, while looking at Bing Webmasters tools I was prompted with a critical error in the Blog page because of recurring H1 tags.
These H1s are each post’s title, which means that as the blog grows bigger, so will the issue.
Does anyone have a solution for this? If search engines penalize this practice, that’s a problem.
All the best!
The other Platt
Sorry, there is a related addition to the problem.
The same happens in the single post page. There are two H1 tags. One is the post title (ok) the other is the button at the very bottom that links to the previous post.
Best,
The other Platt
Hey The other Platt
Let me work up a child theme for you to solve these challenges. I’ll be with you shortly :)
Here we go:
https://siteorigin.com/wp-content/uploads/2015/08/vantage-child-post-h2-headings1.zip
1. Download the ZIP to your desktop.
2. Install from Appearance > Themes > Add New: Upload Theme > Activate.
Activating a child theme does, unfortunately, cause Appearance > Menus > Menu Locations and Appearance > Customize to reset. This is an expected result. In some cases widgets can also drop out of their areas at Appearance > Widgets, you can find them in the inactive widgets area.
Give it a go and let us know how you come along.
Thank you Andrew!
I am already using a child theme so pieces of code will do!
Ahh right. Nice one! Ok so then you’d download and just copy over the files I’m using:
content-single.php
content.php
Finally, pull the rules I’ve aded to style.css out and insert them in your child style.css file OR into your Custom CSS area. Either will work.
Let me know how that goes. Back online tomorrow :)
Thank you Andrew!
As soon as I have a moment I will implement these changes and let you know how it goes!
Best,
The other Platt
For sure :) Chat then.
Hi Andrew,
Here I am. I made the changes and they worked out, however, now we have a new problem: all these pages are missing the H1 tag. More specifically:
– Blog page: no H1 tags at all (bing gives this as an “high severity issue”, same it did when there were several)
– Posts: I am not sure about this, but if the post title is now tagged H2, where is the H1? Bing doesn’t say H1 is missing, so it is somewhere in the page, but not in the title…? Is this going to create issues with Search Engines Indexing?
There is another problem that Bing is noticing in the blog page: “! Redirects detected for the current URL” HTTP codes 301 and 200 (they are both the blog URLs, with and without a “/” at the end)
Thank you again for your support!
The other Platt
Sure :)
1. If you’re using the Full Width, No Page Title template then you’re stripping the page title which is the page h1. You’d need to switch to Full Width or Default page template to return the h1 to the page.
2. I see the issue. Please, remove content-single.php from your child theme.
3. Sorry, not quite sure on this one. That’s most likely the WordPress core handling those. If I knew more about this I’d definitely share.
Hi Andrew,
While I check into No.2 I’ll share that I don’t see options for templates in the Blog page. This is the Blog page as managed by the theme. All my other pages have the default template.
You can see it here: http://www.nyensembleclasses.com/blog
Thanks!
The other Platt
I also tried to use the Page Builder to add a row and an H1 page title, but your theme doesn’t let the Blog page being modified.
Any thoughts?
Thanks!
the other Platt
Hi Andrew, I am back. I removed content-single.php but now big SEO analyzer is telling me that there are two H1 tags in the post page: “High Severity Issue”.
I can see that the second H1 is the bottom button:
Please let me know how to proceed.
Best,
The Other Platt
Ahh right, ok, for your Blog page you’d need to do this: Settings > Reading, deselect Blog as your posts page. On your Blog page insert a Post Loop widget into Page Builder. That’ll let the Page Title render.
For the second issue. Are you running a functions.php file in your child theme? If so, insert the below function in functions.php:
Hi Andrew!
Issue number one: FIXED.
Issue number two: when I save the functions.php file after copying your code, Komodo Edit (v.8.5) tells me that there are characters he can’t save with the current encoding. I am not sure of what to do… I checked the encoding and it is set on Western European (CP-1252).
Any thoughts?
Thanks!
The Other Platt
Glad to hear you’re making progress.
If you’d like you can go grab that function directly from inc/template-tags.php. It’s the first one there. You can follow my directions to see how much to copy and paste.
Sure, hopefully I am not going to break anything…
It’s really easy to break stuff in functions.php, just keep FTP access handy. If something goes wrong just delete the child theme and the site will restore to the parent. Back the child theme up first.
Hmm… is there another way to send me that chunk of code? I am wondering if the problem is actually with encoding. Can I send you a PM and share my email? Maybe you can send me the code above as an attachment in a text file?
https://themes.svn.wordpress.org/vantage/1.4.2/inc/template-tags.php
If you take a look at the snippet I pasted above you should be able to copy that from file I just linked to.
Or you could download Vantage and copy it directly from the PHP file itself in inc/template-tags.php:
https://wordpress.org/themes/vantage/
Then, since this is already running, I will need to modify this function in child theme, right? Isn’t it easier if you just sent me an attachment?
It’s modified in the version I pasted above :) It’s just the h1 tag changed to h2. Quick change.
You can paste the function I pasted above into your child theme from Appearance > Editor > functions.php. That’s an option. Shouldn’t be any encoding issues there.
Here we go:
https://gist.github.com/Misplon/9b65852320d62199a79c
Click Raw to get it plain.
Hi Andrew, I succesfully copied and pasted the code from the first link, but it did not fix the issue.
I still get the same critical error from Bing SEO analyzer. Multiple H1 tags.
Which page is the error on?
All post pages.
It’s the buttons to move to next and previous posts. They are tagged H1.
Please, can you ZIP a copy of your child theme and upload it to your Media Library and then send us the link. The functions change isn’t taking effect.
If you’re running a caching plugin you’ll need to clear your cache.
It’s the following:
That’s hidden and used by screen readers. It’s why we added the function to functions.php to change that tag.
The buttons are regular “a” tags.
This is a private message.
See line 55 in functions.php:
That needs to be:
Line ref:
https://gist.github.com/Misplon/9b65852320d62199a79c#file-vantage-content-nav-php-L41
I changed it but I still get the error…
It’s possible the tool is pulling a cached result now. Try searching the page source. Only one h1 there.
I’ll have to get back to you on this, 1 post out of three shows the error. I think I need to clear caches and so forth…
For the moment thank you for your help, I’ll get back asap!
Checking the page source would be the way to go. You can then confirm what the tool is telling you.
Cheers for now :)
Yes sir, the issue is fixed!
Thank you!
The other Platt
Awesome :) Glad we could help.
All the best.