• Hi,

    I would like to know if there is a way to have the images that are pulled – and usually stored into the media library and set as featured image – to instead be into a custom name field.

    Check the screenshot: http://i.gyazo.com/8de941b3bc87342a827dd24de6232618.png

    So I want the img src url basically to go into that image field. The field name of it is: _standard_image. So is there a way I could perhaps maybe do some custom tweaking into one of the files to have the images that are fetched, placed into that name field instead of being set as a featured image? It could either be through the original img src or the wp-content/uploads url of an image on my server that has already been processed during feeding. Any ideas? Thanks.

    https://wordpress.org/plugins/wp-rss-multi-importer/

Viewing 1 replies (of 1 total)
  • Thread Starter JohnVizer

    (@johnvizer)

    Btw, before I forget I had another question.

    Is there a way I could have the image filenames that are stored on my server from the feed to have the name of the title post and the spaces replaced with hyphens and possible dots and comma’s to be removed.

    So for example, if a title of a post that I am taking in is called:
    This is a title post

    Then i want the filename of the image that belongs to that post to be:
    this-is-a-title-post.jpg

    Right now the filenames fetch the POST id and end it with a -thumb.jpg (What about gif images? That would make them .jpg’s too then?) and I know this is handled in import_posts on line 52. But just not sure how I should take the approach to customize it.
    the code for the people reading:

    <br />
    function setFeaturedImage($post_id,$url,$featuredImageTitle){  </p>
    <p>    // Download file to temp location and setup a fake $_FILE handler<br />
        // with a new name based on the post_id<br />
        $tmp_name = download_url( $url );<br />
    //								echo $tmp_name;<br />
        $file_array['name'] = $post_id. '-thumb.jpg';  // new filename based on slug<br />
        $file_array['tmp_name'] = $tmp_name;<br />

    Perhaps have it echo the Alt text of the image? And then with a -mywebsitename instead of -thumb at the end of the filename.

    I would understand if you can’t explain it all in straight instructional textbook style on how to achieve this with nicely baked codes. But any help is appreciated.

Viewing 1 replies (of 1 total)

The topic ‘Question on image input in a image postformat’ is closed to new replies.