WordPress.org

Ready to get started?Download WordPress

Forums

Assigning post images to a gallery programmatically? (3 posts)

  1. jfigaro
    Member
    Posted 2 years ago #

    I am currently inserting content scraped from the web into wordpress posts via wp_insert_post. The content in question has images and I'd like to assign them to a post as a gallery, if possible.

    anyone know how to do this?

  2. jocken
    Member
    Posted 2 years ago #

    http://codex.wordpress.org/Function_Reference/wp_insert_attachment

    I think that's what you are looking for :)

  3. jfigaro
    Member
    Posted 2 years ago #

    thank you, jocken!

Topic Closed

This topic has been closed to new replies.

About this Topic