web-stories-wp icon indicating copy to clipboard operation
web-stories-wp copied to clipboard

Theme/Plugin compatibility with hotlinked story posters

Open swissspidy opened this issue 2 years ago • 0 comments

Feature Description

When using a hotlinked story poster image, we save the image information in a separate web_stories_poster post meta field. There's no _thumbnail_id meta field because there's no actual attachment.

The downside is that themes relying on the_post_thumbnail() or has_post_thumbnail() won't pick this up, potentially causing an odd display in the default story archive, or causing issues with schema data generated by other plugins like Yoast SEO.

We could potentially filter has_post_thumbnail and the like, but that won't help for cases like if ( has_post_thumbnail() ) { the_post_thumbnail(); } which would just print nothing or could even lead to the theme printing some unnecessary markup.

Alternatives Considered

Additional Context

  • https://wordpress.org/support/topic/story-archive-broken/#post-15857646

swissspidy avatar Jul 27 '22 11:07 swissspidy