by Trevor
4 replies
  • SEO
  • |
I have a problem with the H1/2/3 tags in Wordpress. Because I don't want to have multiple H1 tags on the index page, I re-wrote the index.php so that the titles of the posts on the index page are all H2. But when I am on the post page, the title of the page is also the H1 tag of the post page.

All of that is fine, my problem is that I have H2 tags within a post's content, as well, and with the mentioned settings, the index page shows the post titles as H2 tags and the H2 tags within the posts as H2 tags, too. I think this looks rather spammy. I'd like to transform the within-content H2 tags so that they are H3 tags on the index page. Is there any way I can do it?

I hope my issue is not too complicated. Thanks
#h1 or h2 or h3 #wordpress
  • Profile picture of the author adrenalinfeed
    1. Use the site name/logo as <h1>.
    2. Use <h2> as <h1>, and <h3> as <h2>.
    3. View your site without styles to find out why.
    {{ DiscussionBoard.errors[4137028].message }}
    • Profile picture of the author Trevor
      Originally Posted by adrenalinfeed View Post

      1. Use the site name/logo as <h1>.
      2. Use <h2> as <h1>, and <h3> as <h2>.
      3. View your site without styles to find out why.
      Should I do these changes to the index page?

      I think a solution would be an extra php line to the index.php that would simply transform the within-post H2 tags to H3 tags, but only on the index page.

      Don't you guys know how to do that?
      {{ DiscussionBoard.errors[4137640].message }}
    • Profile picture of the author indexphp
      Originally Posted by adrenalinfeed View Post

      1. Use the site name/logo as <h1>.
      2. Use <h2> as <h1>, and <h3> as <h2>.
      3. View your site without styles to find out why.
      I hate it when WP themes are coded this way. Logos do not belong in a H1.

      H1 's belong as the main title on the page. H2 's the subtitle. And so on.
      {{ DiscussionBoard.errors[4138074].message }}
  • Profile picture of the author kdavis26
    If it is that way, you can change it in the css. Just create a different header section for the logo and change it out. You say that your are using header tags in the post, would you be better off using bold inside the post and keeping your h2 tags for different sub headlines?
    {{ DiscussionBoard.errors[4138857].message }}

Trending Topics