<?php
$categories = array(
'web-design' => array(
'image' => 'slider_webdesign.png',
'title' => 'Title of image',
'height' => '200',
'width' => '960'
),
'template_directory' => array(
'image' => 'slider_printing.png',
'title' => 'Title of image',
'height' => '200',
'width' => '960'
)
);
$category = false;
/* following code might need rewriting since I'm not sure if this is the */
/* correct way of getting current category slug */
if (is_category()) {
$slug = get_category(get_query_var('cat'))->slug;
if (isset($categories[$slug])) {
$category = $categories[$slug];
}
}
?>
<?php if ($category): ?>
<img src="<?php bloginfo('template_directory'); ?>/images/<?=$category['image']?>" title="<?=$category['title']?>" height="<?=$category['height']?>" width="<?=$category['width']?>" />
<?php endif ?>