Keyring Social Importers
[resolved] Import media (images) without creating a new post (3 posts)

  1. Richard Stocks
    Posted 3 years ago #

    First of all - awesome set of plugins (Keyring & Social Importers)!

    Just wondering... is it possible to have an importer set such that it imports the content into the media library, but doesn't automatically create a new post?

    My use-case here is I'd prefer to manually create gallery pages from imported Flickr images, rather than have one image per post.


  2. Beau Lebens
    Plugin Author

    Posted 3 years ago #

    Hi rstocks, glad you like them :)

    While I don't have an option for this available (yet), it's something that I've thought about a little bit and talked with some friends about.

    Because of how it imports the media (using media_sideload_image()), it actually requires a post to attach it to, although could potentially be changed. In the meantime, you could change it so that the posts it creates are only Drafts maybe?

    To do that in the Flickr importer, make sure you're using the latest version, then change line 188 so that instead of:

    $post_status = 'publish';

    it says

    $post_status = 'draft';

    You'll still end up with a new post for each image, but at least they won't be published. I'll take a look at how hard it'd be to just import images to the Media Library instead.

  3. Richard Stocks
    Posted 3 years ago #

    Hi Beau,

    Sounds like a plan, I'll give it a go, thanks! (Come to think of it, the post status should be in the plugin options as well :-)

    I actually took a quick look at the importer before posting, and found the media_sideload_image() reference - and at that point decided that I was out of my depth :-)



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Keyring Social Importers
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic