Archived topic
Change h6 breadcrumbs to div
15 replies · Started by Fernando on July 4, 2017
Hi!
I want to change the h6 of the breadcrumbs to div (normal text), and I do not see how to modify it.
To have the reference, the page for example in question is this: https://www.jmpacheco.com/mejores-editores-video-profesionales/
Hi there,
Normal text as in same as the body?
If so try this CSS:
h6 {
color: #666;
font-family: "Lato",Sans-serif;
font-weight: 300;
font-size: 18px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know.
I'm not seeing any H6 elements in the breadcrumbs?
Yes, just above the comments and sharing buttons. Look
The post navigation?
Try this instead:
.post-navigation {
color: #666;
font-family: "Lato",Sans-serif;
font-weight: 300;
font-size: 18px;
}
The h6 you're seeing is actually the screen reader text, which makes your site more accessible to people who need it.
The actual links are divs and spans.
If you inspect the post with the extension "Web developer" of Chrome, you will see that it detects the navigation of entries as h6, and that is why I want to change it, because I do not have any h5 and directly to h6 is an SEO error.
The only h6 is the screen read text: https://www.screencast.com/t/A4zttKNxHtx
Are you seeing something different?
Yes , im seeing this:
I suppose it's from Yoast breadcrumbs, but I don't know how to change it.
Your screenshot is showing the same thing as I mentioned - the H6 is for screen readers which is important.
It's possible that other elements on your site are using h6 - maybe breadcrumbs. You'd have to check the HTML.
Yes, that's what I say. And how can I change that h6 to h4 or div? Is that for SEO you can't have a h6 if you do not have an h5 before for example.
You would have to overwrite this entire function: https://github.com/tomusborne/generatepress/blob/1.3.48/inc/template-tags.php#L11-L69
I don't typically suggest doing this, but if you copy that entire function and add it to your child theme/custom plugin, you can edit it.
Do I have to copy only the shaded lines in yellow? Lines 11 to 69? In what file do I have to copy them? Why do not you recommend doing it?
Yea, you'd copy that entire function and then make your changes: https://docs.generatepress.com/article/adding-php/
I don't recommend overwriting functions, as you won't get any updates to the function that I may make in the future.
Ok, so I don't do anything, and I hope that you incorporate it into some update.