I would use an if elseif statement to do it:
PHP Code:
<?php
if ( is_home() ) {
echo "<a href='#' title='#'><img src='banner1.gif' alt='#' width='#' height='#' /></a>";
} elseif ( is_single() ) {
echo "<a href='#' title='#'><img src='banner2.gif' alt='#' width='#' height='#' /></a>";
} elseif ( is_category() ) {
echo "<a href='#' title='#'><img src='banner3.gif' alt='#' width='#' height='#' /></a>";
} else {
echo "<a href='#' title='#'><img src='banner4.gif' alt='#' width='#' height='#' /></a>";
}
?>
There is a list of available conditional tags available for WP here.
Hope it helps.
Bookmarks