How can I display site title as <h2> tags on sub pages/posts?

3 replies
Hi

wordpress 3.5
Theme Socrates 3.0+
Have All in one SEO installed

I was checking my site and discovered that all the pages/posts on my blog have the site title in h1. That is bad for SEO. Only on index page I want it to be in h1.

I wonder how I can get the site title to be in h2 on subpages/posts?

I've also been looking into manually change the header.php for the theme but I got an error while doing so:
Parse error: syntax error, unexpected $end in /mydomain.com/wp-content/themes/socrates/header.php on line 207

Here is the part in header.php I changed:

<?php } else {
if (is_home())
{ ?>
<div class="titleText socshadow" style="margin-bottom:-5px;font-weight:bold;"><h1><a href="<?php bloginfo('url'); ?>"><?php echo stripslashes($header['titleText']); ?></h1></div>
<div class="descText socshadow"><?php echo stripslashes($header['descText']); ?></div>
<?php } else { ?>

Thank God I took backup of the file before I edited it

I have attached the file I changed here, my changes are at about line 161

Anyone knowing how to set the site title in h2 on sub pages/posts?
#display #pages or posts #site #title
  • Profile picture of the author loginname
    Hi guys

    I fixed it by replacing the Socrates theme with the Heatmap Theme
    {{ DiscussionBoard.errors[7813394].message }}
  • Profile picture of the author onSubie
    Originally Posted by loginname View Post

    I was checking my site and discovered that all the pages/posts on my blog have the site title in h1. That is bad for SEO. Only on index page I want it to be in h1.
    That statement is incorrect. You need to learn more about SEO.

    Google does not rank sites. It ranks pages. Having an H1 title tag on each page is important for SEO.


    This should be in the Adsense / PPC / SEO Discussion Forum.
    {{ DiscussionBoard.errors[7813415].message }}
    • Profile picture of the author loginname
      Originally Posted by onSubie View Post

      That statement is incorrect.
      but is it good if all those pages had the same keyword in its h1 tag? that was the issue here
      {{ DiscussionBoard.errors[7842687].message }}

Trending Topics