Opened 6 years ago
Closed 5 years ago
#45325 closed enhancement (wontfix)
Twenty Nineteen: Featured Image set on Posts Page doesn't display
Reported by: | igielskv | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.0 |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
When using static Home Page and have assigned some page as a Posts Page (where all the posts are displayed). When editing the Posts Page, there is an option to set the Featured Image here. But when I display the Posts Page, there is no featured image displayed even though I see that image set properly on Posts Page edit.
All the other pages, like Home Page, the Posts them self, they display featured images properly.
I'm using using a development version (5.0-beta3-43883) with Twenty Nineteen theme.
Have good day everyone,
Vladislav
Change History (9)
#1
@
6 years ago
- Component changed from General to Bundled Theme
- Type changed from defect (bug) to enhancement
#2
@
6 years ago
Thanks for suggesting, I'll do that...
just to make it clear, I don't think it is "deliberate decision" of Twenty Nineteen theme, because in Posts Page editor the feature is available to use, it just doesn't work. I understand not everyone would like to have it displayed, of course then they don't need to set it up and just leave it as it is by default, or when featured image is removed from the page of course it wont display.
#3
@
6 years ago
- Summary changed from Featured Image set on Posts Page doesn't display. to Twenty Nineteen: Featured Image set on Posts Page doesn't display
#4
@
6 years ago
I understand not everyone would like to have it displayed, of course then they don't need to set it up
Well, at the moment one cannot disable feature image support for an individual post/page, just for content types as a whole.
#5
@
6 years ago
I just did few tests... It seems like it's probably not particularly Twenty Nineteens theme related issue. I tried to switch back to Twenty Seventeen theme and it shows exactly the same behavior (of course there is an option for Header Media in page customization, but if we disregard this, the Featured Image in all Posts Page editor doesn't actually show on the all Posts Page in Twenty Seventeen theme as well).
I don't know, may be it's standard WordPress behavior... I'm little new to this and I didn't try before. I'm just testing this feature with WordPress 5.0-beta3-43883 running Twenty Seventeen / or Nineteen theme.
Would be nice if someone can check on official WP release 4.9.8 if Featured Image on all Posts Page works or not. And if not, then it's probably good idea to either remove that option to set Featured Image when editing especially this all Posts Page or better make it work (like it works when editing all other pages). Otherwise this settings is confusing.
#6
@
6 years ago
This was also discussed over on GitHub:
https://github.com/WordPress/twentynineteen/issues/541
This is indeed fairly standard behavior for default themes. The posts page does not use the usual single page template, and so the image does not appear. The option for setting the featured image remains when you attempt to edit the page though, so this can be confusing:
From a design perspective, it might be nice to allow users to add a featured image to the top of the posts page. But this is fairly low priority, and something that should be considered for a future release.
#8
@
6 years ago
FWIW, I just encountered this behavior in a fresh Twenty Seventeen WP installation and isolated it down to this logic on line 50 in header.php:
<?php if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) :
I inserted the following text into that line (please note the leading and trailing spaces):
<?php || 10 === get_queried_object_id()
directly after '! twentyseventeen_is_frontpage()' [to explicitly select the blog index page by it's ID] and it solved the problem for me. This is probably just a 'hack' or workaround (and that's perfectly suitable in my case,) but hopefully this will prompt another look by a sharper developer than me? :) I really think it's quite reasonable to want the Blog page to act in a way that is consistent with the other pages in this regard.
#9
@
5 years ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
Having the featured image not show on the Posts Page
is the intended behavior of most themes out there, especially default themes.
It can be accomplished with some customization. However, I have personally run into issues when using the_post_thumbnail()
to display the featured image within the loop on archive pages. the_post_thumbnail()
will always pull the featured image of the first post in the loop. This is one of the reasons that the featured image is not used on archive pages.
@swissspidy is correct in his reply:
I understand not everyone would like to have it displayed, of course then they don't need to set it up
Well, at the moment one cannot disable feature image support for an individual post/page, just for content types as a whole.
I am going to close this ticket, as I don't think this is something that needs to be fixed.
For those who would like to be able to use the featured image on a Posts Page
, you can do so by putting the ID of the Posts Page
into the_post_thumbnail( 'Numeric ID of the Posts Page' )
and place it into your template.
Howdy!
This is an issue or a deliberate decision of the theme you're using. Not everyone would want the featured image to show up on an archives page like that, after all.
Twenty Nineteen is still being developed on GitHub (https://github.com/WordPress/twentynineteen), but will likely move to Trac once WordPress 5.0 is out. Thus, I suggest you to open an issue about this there.