Last active
August 29, 2015 14:21
-
-
Save srikat/67c7689320d0f2365dd9 to your computer and use it in GitHub Desktop.
Full Width Banner Image on Posts page. https://sridharkatakam.com/how-to-add-a-full-width-image-below-header-on-blog-page-in-genesis/
This file contains hidden or 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
add_action( 'genesis_after_header', 'sk_blog_banner' ); | |
/** | |
* Full Width Banner Image on Posts page | |
* | |
* @author Sridhar Katakam | |
* @link http://sridharkatakam.com/ | |
*/ | |
function sk_blog_banner() { | |
if ( ! is_home() ) { | |
return; | |
} ?> | |
<div class="blog-banner"> | |
<img src="http://placehold.it/1600x222&text=Banner" alt="Banner" /> | |
</div> | |
<?php | |
} |
This file contains hidden or 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
/* Full Width Banner Image on Posts page | |
--------------------------------------------- */ | |
.blog-banner { | |
text-align: center; | |
} | |
.blog-banner img { | |
width: 100%; | |
vertical-align: top; | |
} |
Author
srikat
commented
May 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment