Archived topic
Option To Change Page Title Header From H1 To H2
10 replies · Started by Anonymous on August 2, 2016
Hi!
Could you make option in customizer that give user options to choose article header title as H1 or H2?
Hi there,
On pages, the title is an H1 - this is important for SEO.
On the posts page, the titles are H2s. This is important as you're not allowed to have more than one H1 on a single page.
If you want to change this, you would need to overwrite the content.php template file by adding it to a child theme and adjusting the h2 element manually.
I already change mine from H1 to H2 manually in theme file.
I use the H1 manually in my article.
The usage scenario is like these:
Let say I write an article;
Title: GeneratePress Theme Review
Slug: generatepress-theme-review
But to make it interesting I change it to;
Title: GeneratePress Review Theme That You Can Afford Review
Slug: generatepress-theme-review
I can't think of the better title. But you get the idea. The title sometimes have no actual keyword in it.
If we have the option to change the article title to H2, user can use the H1 tag manually in their article.
What do you think?
Why not just use the built in H1 to make your title like that?
Alternatively, use the Disable Elements metabox to remove the content title, and add your own inside the content.
I would not change it. I also want it smaller because it has to be an information of categorys (archives).
I would use something like
.page-title
{
font-size:17px!important;
margin:-5px!important;
}
With this solution you don't overwrite the default content.
heres my thought...
Lets say you build a Page Header block element with H1 above the Content..
Then, h2 for the Page title in the content - this is the use case for a site im currently building.
also - i copied the GeneratePress Parent Theme File "/inc/theme-functions.php/ over to the GeneratePress Child.
But,it doesnt seem to take over - defaults back to the GeneratePress Parent - anythoughts on this?
I think it would be better to:
1. Set the page title as the H1 in the Page Hero.
2. Use an H2 inside the content.
Files in child folders aren't able to be overwritten by child themes. Only root template files can be overwritten in your child theme.
Hope this helps!
Right - i agree - however, that means i would have to remove page title from Every Page??
Is there a way to bulk remove page title from the child?
You can remove the page title in bulk using a Layout Element: https://docs.generatepress.com/article/layout-element-overview/
Let me know if that helps or not :)
That did it - im sure ill hit more snags. but... this is a step forward.
Issue Resolved.
Glad I could help! :)