Here was the original request on SP forums:
I used Sridhar Katakam’s tutorial on relocating entry title headers but I want to make these headers images rather than text. The person who initial responded to my questions said this:
I amended the CSS to display scaling background images to create full width, applying the page-id-xx code in the CSS to define different images for each page.
~ Sam Bell
I am using Featured Image option for pages. So I added following code in functions.php file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
add_image_size( 'header-img', 9999, 250, TRUE ); // Resizing the uploaded image. add_action('genesis_after_header', 'gd_site_banner', 25); function gd_site_banner(){ if( !is_singular('page') ) return; if( has_post_thumbnail() && is_page() ) : $ftbanner = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'header-img' ); $banner = $ftbanner[0]; echo '<div id="site-banner" class="site-banner">' . "\n"; echo '<img src="' . $banner . '">' . "\n"; echo '</div>' . "\n"; endif; } |
Susanta says
Great tutorials indeed. I was wondering if you could possibly help me with the following customization on Parallax Pro theme!
With regards to Sridhar Katakam’s tutorial, how can achieve the following results?
#1: Add Custom Header to Each Page and Post
#2: Add a custom description below the Heading of the Page/Post. Basically, I would like to achieve the same result as they have done here:
Page: http://www.bourncreative.com/services/
Page: http://www.bourncreative.com/contact/
Note: Sridhar’s snippets impact two things: They affect Parallax Pro’s home page and Blog. But I would like to leave these two part unaffected.
Looking forward to your advice!
Cheers,
Susanta
Paul says
Hi Susanta
I already created a plugin. So you can easily add the header banner on Pages, Posts and CPTs. Here is the tutorials
1. Genesis Static Banner
2. How to add rotating overlay text on static banner
Hope that it will meet your requirement.
Chinmoy
Susana Kumar Sahoo says
Thanks for the reply! I appreciate it!
I followed your instructions and installed/activated the plugin but couldn’t get the header to appear in the middle of the featured image.
Please, take a look at my test site: http://www.nprasanta.com/services/
The H2 and entry meta are still appear outside the featured image. I would like them to appear inside the featured image like the examples I shared with you yesterday.
Please, advise!
Thanks,