We have a problem with the basic theme code it seems. When we use Validator.w3 it finds one empty h1 and one empty h2 in the code, and we can’t seem to fix it ourselves.
I contacted Michael from Michael David design to see if this was something from his theme Endeavour, but he says that the pages are generated from rapidweaver and the basic theme. We could go in manually using an FTP-tool and update this but then we have to do that every time we publish something new on our site, which is not an option as we update the site a lot…
I could also fill in the area for title and slogan, but it doesn’t look good on the site. The title is just were our logo is and the slogan is right on the big picture we have (in case it’s not possible to move them??) So I’d rather get rid of the h1 and h2 completely so it disappears from the basic code.
Your only options are to use what the theme suggest, edit after each publishing, or you could modify the theme it self. That’s a bit of an advanced option, and you would not be able to make updates in the future from the theme developer.
The h1/h2 tags are empty, because you didn’t specify a title or slogan. If that’s an issue for you, I advice you use a framework where you have full control about these headers.
It currently cannot be ommited by the theme designer, so you have to change the theme.
@mangankalcit The validator is correct, empty headings are invalid. The proper way to approach this is to provide a site and slogan for the benefit of SEO and website accessibility. If you want to hide it, then that’s really easy with custom CSS code:
Based on the source code shown, potentially you have another validation error that the theme developer needs to fix for you - that being the block elements inside an inline link. That will want fixing in an update. It’s not valid HTML to put divs inside anchor tags.
Thank you @willwood! That code worked. But won’t search engines like Google dislike this? I thought they dislike when you hide SEO-words for example by giving them the same colour as the background of the site, wouldn’t this solution be a little like that?
Yes, we have some more problems with the code from the theme. But the empty h1 and h2 is the most critical
@mangankalcit Can’t see any issues with hiding the title and slogan. It’s commonplace elsewhere. An option in many of my own themes and there’s never been any reported problems. If you are supplementing the hidden title / slogan with a logo, then that seems a legit reason to hide those elements? That’s why I tell people to always keep these fields filled-in.
However writing an entire essay of content stuffed with random keywords hidden on the page certainly will not do you any favours. That will be seen as a deliberate attempt to manipulate / spam search engines; and therefore your ranking will plummet as a consequence.