Insert Featured Image In Style Background


Insert Featured Image In Style Background :

<section class="banner inner-banner" style="background:url(<?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); if(!empty($feat_image)){echo $feat_image;}else { echo bloginfo('template_url')."/images/inner-baner.jpg";} ?>) no-repeat top center; height:395px;">
Advertisements