• Resolved davidspan

    (@davidspan)


    I am writing a plugin that will add post. I know to to post I need to use wp_insert_post, but I also need to upload an image and set a custom field.

    What functions do I need to use to upload and get the thumbnail & medium sized image url and set the custom field?

Viewing 1 replies (of 1 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Look closely at some of these functions:
    wp_insert_attachment
    media_handle_upload (and the rest of media.php for that matter)
    add_post_meta

Viewing 1 replies (of 1 total)

The topic ‘What functions do I need?’ is closed to new replies.