I have a WordPress site which is set up to display posts on the index page as large thumbnails. The post loop brings in each and I have their 'featured image' set as the background of each 'cell' using
<?php
if (has_post_thumbnail()) {
$thumbnail_data = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'my-fun-size' );
$thumbnail_url = $thumbnail_data[0];
}
?>
<div class="bg-img-LC" style="background-image:url('<?php echo $thumbnail_url ?>');">
... content ...
When selected they go to a single.php page which has a custom header.php which puts the featured image as the background of the header's jumbotron
using
<?php
if (has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full');
}
?>
<div class="jumbotron-int row" style="background-image:url('<?php echo $large_image_url[0]; ?>');">
... content ...
I want a different image to be used as the background of the header for the post. Whether that is a tagged image from the posts content, a second 'feature image' (if that's even possible), or however this can be done. Each post will have it's own header, but I DON'T want it to be the same as the feature from the index page