Dynamic heading for archive page

DescriptionWordpress snippet by - 03/04/10

This snippet includes a custom header file for your archive page. Basically it enables you to put different text at the top of your wordpress archive page based on the category of the post or the parent category of that post.

Tags

<?php

$current_category = the_category_ID(false);

$filename = 'heading-' . $current_category . '.php';

if (is_category (4)) {

include ('heading-4.php');

} else include ($filename);

?>
  • Share
Authored by: Adam J Nowak
http://hyperspatial.com

Comments and Feedback