it possible to make post title to get h1 tag
-
Hi,
i have make a little change for tagging in this theme for better SEO,but, it seems not work, i want in my blog Posting the Post-Title become <h1> tag and Blog-Title become <h2> tag.
For the Blog Homepage, i want it normal (Blog-Title <h1> and Post-Title <h2>).This is my change on header.php
Before:
<h1><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
After:<?php if(is_single() OR is_page()) { // On single post pages and static pages we use this code ?> <h1><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1> <?php } else { // On home page and archive style pages we use this code ?> <h2><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h2> <?php } ?>
This is for post.php
<h1 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1>
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘it possible to make post title to get h1 tag’ is closed to new replies.