[Resolved] Option To Change Page Title Header From H1 To H2

Home Forums Support [Resolved] Option To Change Page Title Header From H1 To H2

Home Forums Support Option To Change Page Title Header From H1 To H2

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #215043
    Fahmi

    Hi!

    Could you make option in customizer that give user options to choose article header title as H1 or H2?

    #215053
    Tom
    Lead Developer
    Lead Developer

    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.

    #215552
    Fahmi

    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?

    #215600
    Tom
    Lead Developer
    Lead Developer

    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.

    #1635354
    Raul

    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.

    #2363363
    Casey

    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?

    #2363470
    Tom
    Lead Developer
    Lead Developer

    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!

    #2364364
    Casey

    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?

    #2364411
    Tom
    Lead Developer
    Lead Developer

    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 ๐Ÿ™‚

    #2364454
    Casey

    That did it – im sure ill hit more snags. but… this is a step forward.

    Issue Resolved.

    #2364705
    Tom
    Lead Developer
    Lead Developer

    Glad I could help! ๐Ÿ™‚

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.