• Hello, i’m using HappenStance theme and I want to change site title style to H1. It wouldn’t be a problem if WordPress would allow coding of site title area as well.

    If the theme doesn’t support editing the mentioned parameter, is there a way i can upload a modified page or code a title area through WordPress?

    I have previously posted into WordPress general help section and was redirected to this forum.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author TT Themes

    (@tomastoman)

    Hi,

    please search for the following code in “header.php”:

    <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></p>

    and edit it in this way:

    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>

    Best regards,
    Tomas Toman

    Thread Starter neo107

    (@neo107)

    Where can i find header.php file? There is a theme editor in WordPress – menu, appearance section but it provides another code.

    Theme Author TT Themes

    (@tomastoman)

    Hi,

    you can edit the “header.php” file directly in “Appearance > Editor”, but instead of modifying the original theme directly, I recommend you to create a child theme. The mentioned code is located on the line number 56 in “header.php” (in HappenStance 2.0.7 – free version).

    Best regards,
    Tomas Toman

    Thread Starter neo107

    (@neo107)

    Thank you, i was looking at the wrong file at first. Didn’t see theme file list.

    I’ve changed title parameter to h1 and description parameter to h2, just as i wanted. However, one problem persists. A HTML headings checker detects two h1 headings – one with the site title and another one empty. The empty one was there before i have modified header.php file.

    Could it be that somewhere there is a command to show title in h1 but it’s incorrect and so it stands as empty? Could it be this line:

    <h1 class=”entry-headline”><span class=”entry-headline-text”></span></h1>

    (browser HTML Insperctor)

    It’s important for me, for SEO purposes.

    My site:

    https://www.radar-detector-reviews.com/

    HTML headings checker:

    https://www.seoreviewtools.com/html-headings-checker/

    Theme Author TT Themes

    (@tomastoman)

    Hi,

    yes, the second h1 heading is the page title (that is empty on your front page). To hide it completely, please select the template “Page without Title” in the right side panel “Page Attributes” when you edit the front page.

    The code that generates the page title is located in the file “page.php”:

    <h1 class="entry-headline"><span class="entry-headline-text"><?php the_title(); ?></span></h1>

    If you would like to have only one h1 heading (the site title) on all your pages, just change the “h1” parameter to “h2” in the code above.

    Best regards,
    Tomas Toman

    Thread Starter neo107

    (@neo107)

    Can you explain page without title option? It fixes the problem and the title is still present. Does it just remove the empty title? If so, are there two titles and one of them empty?

    Theme Author TT Themes

    (@tomastoman)

    Hi,

    individual pages can be set to use a specific custom Page Template. When you edit a page, you can select the Page Template in the panel “Page Attributes” that is located on the right side next to the “Visual Editor” window (see this screenshot).

    With the “Default” Page Template, there is only one page title. If you do not define any title for a page, the empty “h1” tag is still included in the source code. But if you select the Template “Page without Title”, there will be no page title (“h1” tag) included in the source code.

    Best regards,
    Tomas Toman

    Thread Starter neo107

    (@neo107)

    Thanks for your support and thorough explanations. I will rate your theme.

    Best regards,
    ?ilvinas

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can't change site title style to H1’ is closed to new replies.