Forum Replies Created
-
AuthorPosts
-
AMCSMember
Hi giddymoon
The banner image and the primary nav bar are both pulling from the 'genesis_after_header' hook, so to make the image appear below the nav bar you just need to change the number on the last line of the code there...
So instead of
add_action( 'genesis_after_header', 'amcs_featured_img', 5 );
you have
add_action( 'genesis_after_header', 'amcs_featured_img', 15 );
That should do it 🙂
Andy
AMCSMemberFor anyone who's interested I solved the problem using the following
// Adding option to use featured image (if it exists) // in place of background image remove_action( 'genesis_after_header', 'beautiful_site_header_banner', 5 ); add_image_size( 'featured-banner', 2000, 300, TRUE ); function amcs_featured_img() { if ( has_post_thumbnail() ) the_post_thumbnail('featured-banner'); else { echo '<div class="site-header-banner"></div>'; }} add_action( 'genesis_after_header', 'amcs_featured_img', 5 );
...partly thanks to the tutorial nutsandbolts referred to above
AMCSMemberI could use something like
remove_action( 'genesis_after_header', 'beautiful_site_header_banner', 5 ); add_image_size( 'featured-banner', 2000, 300, TRUE ); function amcs_featured_img() { the_post_thumbnail('featured-banner'); } add_action( 'genesis_after_header', 'amcs_featured_img', 5 );
to use the featured image to set the banner for each page... (I think)
but is there a way to still use the background image as default for when there is no featured image set?
AMCSMemberThanks - good tutorial. Still doesn't allow clients to change images after launch though...
-
AuthorPosts