Community Forums › Forums › Archived Forums › Design Tips and Tricks › Multiple custom backgrounds in Beautiful Pro › Reply To: Multiple custom backgrounds in Beautiful Pro
January 9, 2014 at 8:56 am
#84167
AMCS
Member
For 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