Is there a way to change how the image is displayed? Rather than just showing a thumbnail, I'd like to use it for the background of the widget area. I need it as the background to utilize the
background-size property to integrate it properly into my theme.
Ideally this would be done in my theme, not the Genesis Framework.
Rather than altering the way the widget functions, could I add my desired output to the widget callback in the template?
My current theme is calling the widget with the following:
genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area"><div class="wrap">', 'after' => '</div></div>', ) );
I tried the following with no luck...maybe there's a better way?
$bkgd_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'home-top' ); genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area" style="background-image: url(' . $bkgd_img . ');"><div class="wrap">', 'after' => '</div></div>', ) );
I don't think so but its a great question.
I think you will need to filter the Genesis featured posts plugins output.
Or maybe this plugin may include that option https://github.com/wpsmith/genesis-sandbox-featured-content-widget
Brad Dalton has written 1910 tutorials & 4000+ Code Snippets for Genesis & WordPress – Not For Hire.
You must be logged in to reply to this topic.
Subscribe to get early access to new themes, discounts and brief updates about what's new with StudioPress!