
I can’t believe how many wordpress themes out their tag themselves as seo-friendly and some even have seo in their theme name and they don’t even do the #1 most important use of the h1 tag. Do yourself a favour if you’re a theme designer and use the following:
The h1 tag should be used for the blog title or blog description but only on the home page. On all other pages, we should relegate it to a h2 at most and put more relevance to the post titles by promoting them to a h1.
To do that, make use of the is_single and is_page wordpress functions in your header.php and alternate your h1 h2 blog title tags:
<?php if(is_single() OR is_page()) {
// On single post pages and static pages we use this code
?>
<h2><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h2>
<div class="description"><?php bloginfo('description'); ?></div>
<?php }
else {
?>
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
<?php } ?>
Now in you single.php and page.php, update your the_title() to h1
<h1 class="single"><a rel="bookmark" href="<?php the_permalink() ?>"></a></h1>
Now because we are using the h2 and h1 tag in the header interchangeably, make sure you style.css caters for both and they look the same
#header h1, #header h2 { font-family: Georgia, "Times New Roman", Times, serif; font-size: 25px; font-weight: normal; padding: 0em 0 0.2em 0; }
do the same for the post title h2 tags in the home page if you need to.

Great piece of advice on header tags. Thanks!
Thanks!) It’s a good note!
Also we need to use H3 H4 H5 H6.
all h tags have the same weight in SEO and all should be used within a website
I was using h1 tags but never knew about this script. Thanks for the share.
Great piece of advice on header tags. Thanks!
Great piece of advice on header tags. Thanks!
Thanks for this note.
great post, from your article, i learn about H1 tags in wordpress
thanks
Great piece of advice on header tags. Thanks!
H1 have attribute style=”font-size: 12px;” instead of using css
hi there, can you recommend a wordpress theme that has a built in H1 tag at the top? I’m afraid to modify my wordpress theme by hand, because the last time I modify my header.php , my whole wordpress blog was down for 3days, until my friend help me to restore everything.
I am looking into integrating this into my website as you speak. Looks like I need to change the h1 tags over to h2
I think this the 1st thing should I learn about SEO.Thanks for sharing this.