I hope this hasn't been covered already - I couldn't find it using my keywords. I designed a site with a new header image for each page. I call it on every page in the header.php
file like this:
<img src="<?php echo the_post_thumbnail_url('full'); ?>" alt="Header Image">
I've enabled featured images in functions.php (add_theme_support('post-thumbnails');
) and it works fine on literally every other page on the site.
Under Settings > Reading I switched the Front Page Displays:
option from Your latest posts
to A static page
and set my Home and Posts pages to Home and Blog (pages I've created in the dashboard).
When I load the blog page, it shows an empty image container. Inspecting the elements shows that there is no src set. If I unset the /blog/ page as the Posts page under Settings > Reading, the image appears. I've tried this with /blog/ using index.php as its template and with it using home.php as its template. No difference.
If the Blog Page lets me set a featured image in the WordPress dashboard, why won't it display?
EDIT: I'm seeing this question, but the answer doesn't actually tell me why or what's happening.