Forums

Use PHP to add new media. (1 post)

  1. sogorman
    Member
    Posted 11 months ago #

    Hello all! I am trying to tackle what I think is a two step process.

    1) Use PHP to upload and add a new piece of media

    2) Use PHP to set the featured image for a known post ID to the media ID I just uploaded.

    I think I found a function to cover the second part but I am struggling to come up with a solution that will allow me to programmatically upload media to the media library. Any tips or advice would be appreciated.

Reply

You must log in to post.

About this Topic