Created
December 18, 2012 23:08
-
-
Save grtaylor2/4332961 to your computer and use it in GitHub Desktop.
Specific WordPress header by category. This will work for both the category archive page and all individual posts marked with specific categories.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( is_front_page() ) : ?><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/specific image for cat"> | |
<?php elseif ( is_category( 'category 1' ) || has_category ('category 1')) : ?> | |
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/specific image for cat"> | |
<?php elseif ( is_category( 'category 2' ) || has_category ('category 2')) : ?> | |
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/specific image for cat"> | |
<?php elseif ( is_category( 'category 3' ) || has_category ('category 3')) : ?> | |
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/specific image for cat"> | |
<?php elseif ( is_category( 'other' ) ) : ?> | |
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/specific image for cat"> | |
<?php else: ?> | |
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/specific imagge for cat"> | |
<?php endif; ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment