phpwordpresswordpress-featured-image

Wordpress - Publish post with featured image at same time via PHP


I am publishing to Wordpress via PHP, as follows.

Problem:

When creating the Post, there is a Plugin (SNAP autoposter) that will automatically publish it on Facebook. But, as obvious, it does not wait until the featured image is attached.

Question:

How should I proceed to publish the post with an already assigned attachment?

Thanks a lot for your help :)


Solution

  • Don't publish the post until the attachment has been added.

    If the plugin is setup correctly, it will be listening for the status transition to publish.