Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/6199617 to your computer and use it in GitHub Desktop.
Save braddalton/6199617 to your computer and use it in GitHub Desktop.
function specific_header_image(){
if(is_home())
echo '<div class="home-header"><img src="http://example.com/path/to/image.png" alt="home header image" /></div>';
elseif(is_page() )
echo '<div class="page-header"><img src="http://example.com/path/to/image.png" alt="page header image" /></div>';
}
add_action('genesis_header', 'specific_header_image');
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/display-custom-header-images-on-category-archive-pages/
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment