I want to use a thumbnail (featured image) as background but I can’t get it to work, I have googled and found something that worked for other people but not for me, guess I am doing something wrong.
Here is my code
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' );
?>
<div id="start" style="background: url(<?php echo $src[0]; ?>) !important; background-size: cover; background-position: center;">
<div class="table">
<div class="table-cell">
<div class="inner row">
<div class="large-12 columns">
<?php the_content(); ?>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>