I have a set of images I'm slipping into "thematic_abovecontent" with the function below. It's not really efficient php, but it's what I currently understand.
I need to add onto this so that I can also drop in images via that hook for certain category pages such as "news." But I cannot figure out how to integrate that. Anyone willing to point me in the right direction?
// insert graphic space abovecontent
function photo_banner(){
if(is_page() & !is_paged()) { ?>
<div id="photobanner"><?php
if (is_page('home')) {
$banners ='ph_hm.jpg';
}
elseif ( is_page('about') ) {
$banners = 'ph_mike_meeting.jpg';
}
elseif ( is_page('resources') ) {
$banners = 'ph_books.jpg';
}
elseif ( is_page('our-practice-areas') ) {
$banners = 'ph_mich_client.jpg';
}
elseif ( is_page('what-clients-say-about-us') ) {
$banners = 'ph_sam_board.jpg';
}
elseif ( is_page('contact-us') ) {
$banners = 'ph_mmm.jpg';
}
elseif ( is_page('blog') ) {
$banners = 'ph_blog.jpg';
}
?><img src="<?php echo bloginfo('stylesheet_directory') . '/images/banners/' . $banners; ?>" /></div>
<?php }
}
add_action('thematic_abovecontent','photo_banner');