Hi! How to wrap a sitename in tag <h2> on node's pages but leave it wrapped in <h1> on a frontpage? There are two tags <h1> by default this is not good for SEO and stuff like that.

Comments

danielhonrade’s picture

Thanks, I'll change that on the next version, you can override the default by adding this to your template.php:

<?php
/** 
 * Identity
 *
 * Grouped variables
 * - Logo
 * - Site Name
 * - Site Slogan
 *
 */

function yourtheme_identity($logo, $site_name, $site_slogan, $front_page) {
  if (!empty($logo) || !empty($site_name) || !empty($site_slogan)) { 
    $out = '<div id="logo-title">';
    if (!empty($logo)) $out .= '<a href="' . $front_page . '" title="' . t('Home') . '" rel="home" id="logo"><img src="' . $logo . '" alt="' . t('Home') . '" /></a>';
    if (!empty($site_name) || !empty($site_slogan)) { 
      $out .= '<div id="name-and-slogan">';
      if (!empty($site_name)) $out .= '<h2 id="site-name"><a href="' . $front_page . '" title="' . t('Home') . '" rel="home">' . $site_name . '</a></h2>';
      if (!empty($site_slogan)) $out .= '<div id="site-slogan">' . $site_slogan . '</div>';
      $out .= '</div> <!-- /#name-and-slogan -->';
    }    
    $out .= '</div> <!-- /#logo-title -->';
    return $out;
  }
}
?>
danielhonrade’s picture

Status: Active » Closed (fixed)

fixed on version 2.17