0

I was shocked to see Bing Webmaster Tools notification that my site: http://www.articlesdirectoryindia.com using Garland theme has two H1 tags and that only one should be there for SEO reasons.

Actually the site name : "Free Articles Directory India" is wrapped within h1 on all pages in the header which I want remove.

I want to know if there is any standard & tested workaround for removing this h1 and replacing this with some div etc?

I tried to change h1 to div for 10 minutes but I could not do it. Even if I'm able to it'd be difficult to test of all browser versions.

1
if ($logo || $site_title) {
        print '<h1><a href="'. check_url($front_page) .'" title="'. $site_title .'">';
        if ($logo) {
          print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />';
        }
        print $site_html .'</a></h1>';
      }

These are the lines 39-45 in Garland Themes page.tpl.php. This is probably the h1 tag you're talking about. If you want to change it to div it should look like this afterwards:

if ($logo || $site_title) {
        print '<div class="youclassname"><a href="'. check_url($front_page) .'" title="'. $site_title .'">';
        if ($logo) {
          print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />';
        }
        print $site_html .'</a></div>';
      }
| improve this answer | |
  • What do you mean with html/css code? The answer Volker gave is the best solution to this problem. – JurgenR Jul 8 '12 at 6:46
  • @JurgenR yes but I need some tested css too to display the title similarly. I had already tried this before posting here. I'm not able to make the title display in the same way. – AgA Jul 9 '12 at 10:49
  • So you did apply all css-styles of the former H1 to your new div? – Volker Jul 9 '12 at 11:29
  • You could post your css of the h1 and the div to compare... – Volker Jul 9 '12 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.