We are making a template in beaver builder and want the Featured image as background image in a row. This is currently not possible in the options.
Is there a way to get the featured image as background image in a row?
Hi, yes it’s possible with Beaver Themer and a field connection that will set the current post featured image as the row background.
Incredibly easy, wordpress has had shortcodes for 20 odd years. get_the_post_thumbnail_url()
function was added in WP 4.4 ( 6 years ago ) combine the two:
add_shortcode( 'featured_image_url', function() {
return get_the_post_thumbnail_url();
});
Now just add [featured_image_url]
as the row image URL
1 Like