WordPress.org

Support

Support » How-To and Troubleshooting » Autopost images every 2 hours from Media Library

Autopost images every 2 hours from Media Library

  • hi

    i want create a autoblog with images. i upload all images to the wordpress media library and i want wp a create automatic every 2 hours a post with 1 image from the libray. only the images, no text.

    how can i do that, with plugins?

Viewing 1 replies (of 1 total)
  • The way I would do would be to

    1. Create a new meta field for each attachement called ‘posted’.
    2. Create a function that creates a post wp_insert_post() and inserts an img tag with the next image in the media library (that does not have posted set to true) into the post content. Ensure that the image used gets ‘posted’ set to true.
    3. Schedule a wp_cron() job to run the function every two hours

    Good luck.

Viewing 1 replies (of 1 total)
  • The topic ‘Autopost images every 2 hours from Media Library’ is closed to new replies.
Skip to toolbar