Closed (fixed)
Project:
Blue Bars
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2008 at 13:38 UTC
Updated:
20 Nov 2008 at 16:14 UTC
With this theme we get two h1 tags on nodes. Page title and site title are h1 on every page except frontpage where only site title is h1. I wanted to accomplish that site title is h1 ONLY on frontpage, and on other pages the PAGE TITLE to be the only h1.
So I excluded h1 from site title by removing this from page.tpl.php:
<?php if ($site_name) { ?><h1 class='site-name'><a href="<?php print $base_path ?>" title="<?php print t('Home') ?>"><?php print $site_name ?></a><?php } ?></h1>
and replacing it with this:
<?php if ($site_name) { ?><div id="site-name"><a href="<?php print $base_path ?>" title="<?php print t('Home') ?>"><?php print $site_name ?></a><?php } ?></div>
and adding to style.css this
#site-name { font-weight: bold; font-size: 30px; }
So I removed h1 from site title. But on every page. And I wanted site title to remain h1 on frontpage, and since I have no experience in php, don't know how to do it. Can anyone help?
I have found solutions for other themes, but didn't manage to successfully implement it on this one, like this from Zen theme:
<?php if ($is_front): ?>
<h1 id="site-name">
<a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home">
<?php print $site_name; ?>
</a>
</h1>
<?php else: ?>
<div id="site-name"><strong>
<a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home">
<?php print $site_name; ?>
</a>
</strong></div>
<?php endif; ?>
Comments
Comment #1
sedmi commentedHere is the solution I got from from "happy" at digitalpoint forum: