Getting Taxonomy Term to be listed as Title/H1

I'm trying to get the "term" in a taxonomy to display as the page title/H1 on the page.

I.e., you click on a tag and that takes you to a page that shows all items with that tag. In other themes, the tag term displays as a Title and an H1, so it's clear to the end-user what the tag their viewing is about.

The tag term does display as a page title, but it's not displaying at all in the content. What am I over-looking to get this to print out? What was the reasoning behind not displaying the tag term prominently on the page (so as to do a better SEO)?

javabear's picture
Offline
Joined: 07/02/2010

well, figured it out... for those who are wanting this as well, you need to modify page.tpl.php

around line 231, in the main-content DIV, above the line to print Tabs, add the following line:

<?php if (!empty($title)): ?><?php print $title; ?><?php endif; ?>

the class can, of course, be changed to whatever you need/want.

Rob D.'s picture
Offline
Joined: 04/09/2008

Hey javabear,

Just a sidenote to this that you've possibly already discovered - there's an additional call to the title in node.tpl.php that likely should be removed if you're moving the conditional statement over to the page.tpl.php. Otherwise you may end up with an unwanted double title on all of your site's content.

Support hours: 9AM - 5PM EST, Mon - Fri

Follow us on: