1. Get image url in a variable
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
2. Now add this in your inline CSS. For example:
<a href="" class="" style="background-image: url(<?php echo $url; ?>);" ></a>
1. Get image url in a variable
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
2. Now add this in your inline CSS. For example:
<a href="" class="" style="background-image: url(<?php echo $url; ?>);" ></a>