WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 8 months ago

#45325 new enhancement

Twenty Nineteen: Featured Image set on Posts Page doesn't display

Reported by: igielskv Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.0
Component: Bundled Theme Keywords:
Focuses: Cc:
PR Number:

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 (8)

#1 @swissspidy
11 months ago

  • Component changed from General to Bundled Theme
  • Type changed from defect (bug) to enhancement

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.

#2 @igielskv
11 months 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.

Last edited 11 months ago by igielskv (previous) (diff)

#3 @SergeyBiryukov
11 months 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 @swissspidy
11 months 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 @igielskv
11 months 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 @kjellr
10 months 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:

https://cldup.com/0awvUJtW5b-3000x3000.png

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.

#7 @lonelyvegan
10 months ago

  • Milestone changed from Awaiting Review to Future Release

#8 @carlh04426
8 months 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.

Note: See TracTickets for help on using tickets.