Forums

H1 Header tags...how do I fix this? (4 posts)

  1. ryanrigney22
    Member
    Posted 3 years ago #

    My header.php file for my blog is getting its H1 tag from here:

    <h1 class="blog-title"><a href="<?php echo get_option('home'); ?>/" accesskey="1"><?php bloginfo('name'); ?></a></h1>

    and I want it to get the h1 tag from whatever particular page that it is on (not the home page)

    how do I fix this?

    (If you need more information I'll provide it gladly)

    Thanks

  2. JLeuze
    Member
    Posted 3 years ago #

    Do you want your blog title replaced with the page or post titles on those pages? Or do you want keep the blog title on those pages, but in a different tag, like H2, and use the H1 for the post or page title further down the page?

  3. asechrest
    Member
    Posted 3 years ago #

    I wanted to do the same thing a while back, so I wrote up a guide to using the H1 tags for post titles (and SEO purposes if you subscribe to the theory that H1 tags help).

    Let me know if it works for you. If you have any questions just reply to that article or this thread.

  4. JLeuze
    Member
    Posted 3 years ago #

    Yeah, asechrest's suggestions are good, I would use the H1 on your homepage for your site's title, and then an H2 tag for it on the other pages.

    Using that H1 tag for your page and post titles is a good idea for usability and accessibility. But be careful that you are only using an H1 for the post titles on the single post template. You wouldn't want to use that on an archive or category page and have ten H1 tags on one page!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.