Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hi Felice,
    the plugin works like a charm and it’s my favorite Instagram WP plugin.
    concerning your “fix” to photo insertion mode on posts and featured image both, I need to get two different pictures, one at full size for posts insertion and one resized (not in css or html) at 255px, is this possible?

    thanks!

    About the “Photo insertion mode for posts”, I din’t think of adding the “both” option, but it’s actually useful, I’ll add into next version.

    In the meantime there are some modifications that can be manually done to the plugin to work this way:
    – file: instagram/instagram.php
    – function: wpinstaroll_createpostfromphoto()
    – lines 482-499:
    if ($insert_photo_mode === ‘featured’)
    {
    // attach to image as featured image (post thumbnail)
    add_post_meta($created_post_ID, ‘_thumbnail_id’, $attach_id, true);
    }
    else {

    if (!$image_info)
    $image_info = wp_get_attachment_image_src($attach_id, ‘full’);

    // insert the image inside the post, followed by post caption
    $update_post_data = array();
    $update_post_data[‘ID’] = $created_post_ID;
    $update_post_data[‘post_content’] = ‘<img src=”‘.$image_info[0].'” alt=”‘.strip_tags($insta_caption).'” width=”‘.$image_info[1].'” height=”‘.$image_info[2].'”/>
    ‘.
    $insta_caption;

    wp_update_post($update_post_data);
    }
    must become:
    // attach to image as featured image (post thumbnail)
    add_post_meta($created_post_ID, ‘_thumbnail_id’, $attach_id, true);

    if (!$image_info)
    $image_info = wp_get_attachment_image_src($attach_id, ‘full’);

    // insert the image inside the post, followed by post caption
    $update_post_data = array();
    $update_post_data[‘ID’] = $created_post_ID;
    $update_post_data[‘post_content’] = ‘<img src=”‘.$image_info[0].'” alt=”‘.strip_tags($insta_caption).'” width=”‘.$image_info[1].'” height=”‘.$image_info[2].'”/>
    ‘.$insta_caption;

    wp_update_post($update_post_data);
    That should be all (this way, the plugin ignores the settings set in main panels and behaves as ‘both’ has been selected).

Viewing 1 replies (of 1 total)