Different Header Image for Recent Posts and Search Pages
-
I’ve found a few ways to have different header images appear for different pages using PHP code, such as:
<?php $page_id=get_the_ID(); if(is_page()) { $image='image-'.$page_id.'.jpg'; }; if(!file_exists(TEMPLATEPATH.'/images/'.$image)) { $image='image.jpg'; } echo '<img src="'.get_bloginfo('template_url').'/images/'.$image.'"/>'; ?>
How would I use this code to do this for my archives, recent posts, and search result pages?
- The topic ‘Different Header Image for Recent Posts and Search Pages’ is closed to new replies.