press-this icon indicating copy to clipboard operation
press-this copied to clipboard

Add Featured Image Support

Open kraftbj opened this issue 7 years ago • 10 comments

Originally https://core.trac.wordpress.org/ticket/39956

Featured Image is a nicer datapoint than inserting the image HTML into a post's content.

The media workflow for Featured Image doesn't actually save anything via AJAX, it just returns HTML that gets blobbed into that page, and is then coincidentally associated on save. This works on the Post Edit screen because there is a meta box for the AJAX to interact with. In Press This, there is no target for the HTML, rendering the Featured Image workflow moot.

kraftbj avatar Oct 23 '17 16:10 kraftbj

I can confirm that this is a bug as well. The option to add a featured image is there when using Press This and even picking an image that's already uploaded to the media library results in NO featured image being added.

chazzzzy avatar Oct 28 '17 19:10 chazzzzy

Was this ever fixed?

datdudejibril avatar May 16 '18 02:05 datdudejibril

@datdudejibril This issue will have updates when there has been progress.

kraftbj avatar May 23 '18 13:05 kraftbj

@kraftbj No problem I've gotten the image issue fixed.

datdudejibril avatar May 24 '18 23:05 datdudejibril

I know you said, "This issue will have updates when there has been progress.", but that was quite awhile ago and thought I would just check. Thanks!

Gr8Britton avatar Oct 02 '18 00:10 Gr8Britton

So...... whats the status on the featured image issue????? Has everyone gave up on this plugin?

Moderndayfreak avatar May 14 '19 06:05 Moderndayfreak

@datdudejibril Do you think you could share your solution for this with the rest of us fine folks who are looking for help? Here's a snippet I'll share: Press This for The Events Calendar (or really any custom post type with minimal modification)

Plugin: Press This for The Events Calendar

flexseth avatar Jun 04 '19 21:06 flexseth

There was another Trac ticket about this: https://core.trac.wordpress.org/ticket/40033

sabernhardt avatar Jun 17 '21 03:06 sabernhardt

No fix for the featured image - is everyone using a different plugin then?

RobinEd avatar Dec 20 '23 08:12 RobinEd

Installed the plugin and bookmarklet for the first time in forever. It allows the option to include an image as the first image of the post, here's a screenshot when I used it on the State of the Word on WP Tavern.

image

There are plugins out there that will attach the first image of a post as the featured image. That's probably the best workaround, here's one of those plugins: https://wordpress.org/plugins/auto-post-thumbnail/

Disclaimer: I have not used this plugin.

For anyone looking to contribute to WordPress, here's a great opportunity! Search the web for the code to pull the first image of the post and auto-add it as featured image ("post thumbnail").

Add that code to this plugin, make sure it meets coding standards, and submit it as a pull request to this repository and you have your first contribution!

That said, the official WordPress plugin repo says it has not been tested with a few major releases of WP - so that's probably a best first step - making sure the plugin is compatible with WordPress 6.x+

flexseth avatar Dec 21 '23 02:12 flexseth