Hello,
Thanks for the reply. I was meaning being able to assign it to a custom field that I define not one already in the plugin. The reason for this is I have a theme that has a custom post type for photos and doesn’t use the featured image but its own custom field.
This would mean you select ‘store in custom field’ and then type the custom field instead of selecting save photo to posts featured image.
What I ended up doing was writing a cron job that runs once a day to do this. I have attached the code incase someone needs it. It would need to be modified to suit but gets the job done!
function instagram_feature_image_change() {
$args = array(
'post_type' => 'photo',
'post_status' => 'publish',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'photo-category',
'field' => 'slug',
'terms' => 'instagram'
)
)
);
$posts = get_posts($args);
foreach ($posts as $post) {
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
update_post_meta( $post->ID, '_custom_image_name', $post_thumbnail_id );
}
}
add_action( 'instagram_feature_update', 'instagram_feature_image_change' );
if( !wp_next_scheduled( 'instagram_feature_update' ) ) {
wp_schedule_event(time(), 'daily', 'instagram_feature_update');
}
If you could add the feature I could remove this code. If not, someone might find this useful.