• Hi everyone. I’m another newbie here so I’m hoping I can have help with a question about the h1 tag on my site.

    My understanding is that when you write a post or create a page in WordPress that the “title” field is automatically set to the h1 tag. Is that correct? I’ve also read that Google looks for the h1 tag when it crawls through your site and uses it as a criteria in ranking your site?

    With all that said, it seems that when I inspect my “title” in my site using my Web Developer Tool, it comes up as an h2 tag. Why would that be and how do I make it an h1 tag?

    Here is an example page so you can see what I mean. https://www.eseaweednutrition.com/category/home-page/ When you get to the page, inspect the heading named, “Welcome Post for Home Page”. You will see that it’s an h2 tag even though I typed that title directly into the “Title” field in WordPress.

    Thank you for your help!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi Matt

    The title is usually h1 but it could be that in your theme’s case, it is not. You will need to manually change your theme files. Look for the code

    the_title()

    and you should be able to find it enclosed within h2 tags. Change tat to h1.

    Thread Starter mattd71

    (@mattd71)

    Hi Sid,

    Thank you for answering my question.

    I do remember seeing,the “Welcome Post for Home Page” in between h2 tags but the problem is I don’t know where or how to find it in the CSS. I’m having some problems finding anything that looks like “the_title()” anywhere.

    Would it be possible for you to point out where the code is in the CSS or perhaps maybe you could let me know what the exact code line is so I can just go line by line until I find it?

    Thanks for your help!

    The solution is not in the css file. You need to make changes in the theme’s files

    page.php
    single.php
    index.php

    also in the category.php file or archive.php file (if they are there)

    In those files you are like to find something like:

    <h2> <?php the_title(); ?> </h2>

    and that is where you need to make the chnge.

    Thread Starter mattd71

    (@mattd71)

    OK, I’ll take a look and see. Thanks!

    ctrl+f and search for <h1> in your coding…

    Thread Starter mattd71

    (@mattd71)

    OK, Sid, I was able to change the tags to h1. However, the next thing I wanted to do was change the color and maybe the font but I don’t see any line on my page.php that designates a color or a font. Here is the link to the home page https://www.eseaweednutrition.com. When I use the Web Developer Tool to inspect the title, “Welcome to eSeaweed Nutrition.com!” I can clearly see it is between the h1 tags, but where the heck is the color and font so I can change it?

    Orpatech, when I do command F(I’m using and Apple Computer) to find anything by computer makes a buzz noise and the field in the search box turns red. Any idea what that’s about?

    Thanks to both of you for your patience and help.

    This time you need to make the change in the css file.

    h1, h2, h3 {
    font-family: “Didot”,Arial,Helvetica,sans-serif;
    line-height: 30px;
    }

    If you want to change h1, remove that from the above and make a separate entry for it so that you will have

    h2, h3 {
    font-family: “Didot”,Arial,Helvetica,sans-serif;
    line-height: 30px;
    }

    h1{
    font-family: Georgia;
    line-height: 50px;
    color: #4c4c4c !important;
    }

    Thread Starter mattd71

    (@mattd71)

    Great, I’ll take a look at it tonight and make the changes. Let you know how it goes. Thanks for taking the time to help me with this!

    Thread Starter mattd71

    (@mattd71)

    Hi Sid,

    OK I got the color to change but the font won’t. Here is the code line I added to the style.css:

    h1{font-family:Times; line-height:30px; color:#6d864f !important;}

    I also tried

    h1{font-family:”Times”; line-height:30px; color:#6d864f !important;}

    No matter what font I put in there it doesn’t change. Any suggestions? Maybe I typed something wrong?

    Hi Matt

    Actually you did not remove h1 from the first declaration
    h1, h2, h3 {
    font-family: “Didot”,Arial,Helvetica,sans-serif;
    line-height: 30px;
    }

    Here is a generic css tip. Whenever there are multiple declarations and yo
    wish to resolve the conflict use !important after writing the value of a css property if you do not wish to find the conflict. Thus in your case:
    h1{font-family:Times !important; line-height:30px; color:#6d864f !important;}

    will resolve the issue.

    Thread Starter mattd71

    (@mattd71)

    Thank you Sid! That worked out great and thank you for the advice.

    Could you recommend a good book for a novice like me so I can get a handle on this stuff? Or maybe there’s a website that teaches this?

    You’re welcome Matt.

    Actually I have made a whole video program myself. Check out:

    https://www.webinstitute.in/members/

    I teach everything from scratch using screencast videos.

    Thread Starter mattd71

    (@mattd71)

    Great, I’m going to check that out. Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Having problems with the title h1 tag’ is closed to new replies.