Reply To: Featured image from FTP, Dropbox or local folder?

Home Forums TurboCSV Support Featured image from FTP, Dropbox or local folder? Reply To: Featured image from FTP, Dropbox or local folder?

#11610
Chris
Keymaster

Hi,

I don’t have a solution for you, since this is specific to your theme/setup.  I can give you some background information and a suggestion.

WordPress saves images in the media library as an “attachment” post type with the meta key “_wp_attached_file” set to the file name (relative to the WordPress ‘upload’ directory).   Featured images are assign by setting meta key “_thumbnail_id” of the parent post to the attachment post’s ID.

I’m not clear on how your theme attaches images to the post, but from the code it looked like it creates image attachment posts and assigns post_parent to the main post.

Maybe you could use a filter or action to create those attachments?  For example,

1. FTP the images to your directory (much like you would normally upload them to the media library).

2. Place the file name(s) to be attached into a custom field for each post.

3.  During import, as each post is created the “added_post_meta” action will fire for that custom field.  Call the theme’s attachment function from that action.