In this article I am going to share a basic Page template for Genesis which when applied to a Page will show Featured image (if present) and the Page's content in the container. This is similar to Landing Page template that comes in a few Geneis child themes with the additional feature of displaying Page's Featured Image as a header. So by applying this template to multiple Pages and adding different Post thumbnails, you can have several Pages with unique banner images.
Create a Page named say, page_banner.php having the following code and upload it to child theme directory:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Hi Sridhar,
How can I make this work for a specific header image I want to use for all pages with “real-estate” or “idx” as their parent?
Would it be something like…
add_action ( ‘genesis_before_header’, ‘real_estate_header’ );
function real_estate_header() {
echo ‘
‘;
}
}
No. You would use something like this: https://gist.github.com/7983414
Thanks, Sridhar!
I looked at the code and tweaked it a bit to suit what I want, but I messed up somehow. How do I get the header to center and link to http://cortezcolorado.net/real-estate?
https://gist.github.com/srikat/7983414
Do I need to add a real_estate_header.php file to my theme and add code to my functions.php?
(Webpage is http://cortezcolorado.net/real-estate/mockup/)
Sorry, I commented on your code and it didn’t show up right. This one shows the correct code…
https://gist.github.com/derekalvarez/8008701
thx 🙂
So far this works, but I don’t want a full page template, I still want the sidebars and other parts of the page to show up. How can I do that? You can view the experimental page here: http://journeytothecenterofyourheart.com/?page_id=2
Never mind. I figured it out through a little bit of trial and error. Thanks for this code though, it works great. (you can delete my previous help comment).