• Hi,

    I’m new to wordpress and I’m trying to edit all the H1-H6 tags on a friend’s website. I want to add/edit the tags myself vs a plugin (as I haven’t had great luck with these).

    (I know this is probably a dummy question but I’m new, so I appreciate your help!)
    In my page.php file – the h1 is being set by this – seems to be common across WP:
    <header>
    <h1 class=”page-title” itemprop=”headline”><?php the_title(); ?></h1>
    </header>

    Can you explain what exactly this is doing? I can’t find the h1 class and I can’t figure out where the actual text for the H1 is being set.

    For example, on this page:
    https://shoulderpainatnight.com/how-to-use-the-pillow/
    The H1 is How To Use The Pillow – how do I set this? Should I delete the above? There are also multiple H2s being set.

    THANK YOU!

Viewing 4 replies - 1 through 4 (of 4 total)
  • the_title() is a function that displays the title of the current page or post.

    To change this title you need to edit the page or post and change the text in the very first field at the top, under Edit Page text and above the permalink.

    Thread Starter rackitup

    (@rackitup)

    Ok thanks – but that is setting the page Title. I want to update the H1 in the header.
    How do I set the h2-6 tags? manually in each page?

    Usually you would add the h2, etc, tags and other headings in the content of the page using the page editor.

    If I read this correctly, you do not want to edit the page title, but the title of the main site in the settings?

    If so, you want get_bloginfo(‘name’). That will display the site title. Like jowaltham said, the_title is just the post or page title.

    I hope this helps.
    Bruce

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘What does this do ?php the_title();?’ is closed to new replies.