WordPress.org

Ready to get started?Download WordPress

Forums

Automatic Featured Image Posts
[resolved] Use with Elegant Themes (custom field Thumbnail) and eShop (18 posts)

  1. iboxsolutions
    Member
    Posted 2 years ago #

    Hi,

    This is an excellent plugin, it's saving me heaps of time, so thank you.

    I just wanted to share my adaptation of this plugin in case anyone else wants to use this with a theme that uses a custom field for the Thumbnail instead of the featured image (such as Elegant Themes).

    Edit automatic-featured-image-posts/automatic-featured-image-posts.php and replace /* Assign the featured image */ and everything there after with the code below, which will:

    - Disable setting a featured image.
    - Automatically attach the image to the new post.
    - Automatically add the attached image's url to a custom field called Thumbnail

    What I would really like to do next is get the plugin to automatically populate the eshop fields to make the post a product in the eshop store. Initially this seemed like it would be a simple case of adding a post_meta record, but it has transpired to be a bit more involved. If anyone cracks it then please let me know.

    I hope this is useful to some of the other photographers out there using WordPress.

    Tim

    /*  Assign the featured image */
    	/*  update_post_meta( $new_post_id, '_thumbnail_id', $post_id ); */ 
    
    	// Update attached image
    	  $my_post = array();
     	  $my_post['ID'] = $post_id;
        	  $my_post['post_type'] = 'attachment';
      	  $my_post['post_mime_type'] = 'image/jpeg';
     	  $my_post['post_parent'] = $new_post_id;
    
    	// Update the post into the database
     	   wp_update_post( $my_post );
    
    	/*  Populate the custom Thumbnail field */
    	update_post_meta( $new_post_id, 'Thumbnail', wp_get_attachment_url( $post_id ) ); 
    
    	/*  Populate the eshop product field defaults */
    	//This is a planned future development.
    
    }

    http://wordpress.org/extend/plugins/automatic-featured-image-posts/

  2. Jeremy Felt
    Member
    Plugin Author

    Posted 2 years ago #

    Hey Tim,

    Glad you're enjoying the plugin.

    I've taken care of the attached image section of the clip you shared in the latest update (0.5). Attachments will now be 'attached' correctly to the new post that was created.

    I'll explore adding an action/filter in the next release so that updating extra post meta during this plugin's operation can be something added to your theme's functions.php file.

  3. 3x7
    Member
    Posted 1 year ago #

    Hi,

    did u manage to get image link to custom field?

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I would just like to point out that we (eShop's developers) do not recommend using eShop with any theme from Elegant Themes and we cannot support the eShop plugin when used with them.

  5. Jeremy Felt
    Member
    Plugin Author

    Posted 1 year ago #

    3x7,

    Can you expand your question a bit? I'm not exactly sure what you're looking for.

    There are a several filters available for use with Automatic Featured Image Posts that you may want to check out - jeremyfelt.com/wordpress/2012/04/14/filters-in-automatic-featured-image-posts

    Thanks!

  6. 3x7
    Member
    Posted 1 year ago #

    I want to "create/add" custom field with image url.

    I found this code so I would need some help about where to put it...
    add_post_meta( $post_ID, 'ProductUrl', $target_url);

    I'll check the source you provided...

    Thanks!

  7. d_alinus2004
    Member
    Posted 1 year ago #

    Hello,

    Please let me know if this plugin it's available for upload the featured image into the old post?!

    I have one website with 900 post and it's almost imposible for me to set one featured image for each post. So, please let me know if with this plugin i can make this thinks?

    I have one theme from Elegant Theme.

    Many regards

  8. 3x7
    Member
    Posted 1 year ago #

    This plugin will create posts of images uploaded...

    If you need "ONE" specific image for all posts, then try this:
    try http://wordpress.org/extend/plugins/default-thumbnail-plus/

    You can also set default post thumbnail by category, so try this
    http://wordpress.org/support/plugin/fpw-category-thumbnails

    or Each post has it's own image and u want this image to be set as thumbnail? for this try http://wordpress.org/extend/plugins/auto-post-thumbnail/

    Cheers!

  9. d_alinus2004
    Member
    Posted 1 year ago #

    Hello,

    I will try the last one, because i need to have thumbnail for each post. and i belive that i can upload another images for the post.

    i will let you know. Now the plugin are generating post thumbnails.

    Many regards

  10. d_alinus2004
    Member
    Posted 1 year ago #

    dosen't work any plugin..:((

    I use one theme from Elegant Theme.. but still dosen't work...

  11. Jeremy Felt
    Member
    Plugin Author

    Posted 1 year ago #

    Hey d_alinus2004,

    Automatic Featured Image Posts is specifically for new images and posts, so it will not be able to handle the featured images for your old posts. Good luck!

  12. 3x7
    Member
    Posted 1 year ago #

    Strange, auto-post-thumbnail should work if you have attached images in your content section... it picks up the first image found in the post content. Or you need something to get images online and add them to your post?

    Do you see thumbnails in the "featured image" widget when you edit the post?... If so, then the image is set, but theme is not displaying featured image.

    You can try changing the theme for a minute to see if other theme is showing thumbnails. You can also try changing it while generating thumbs, then get it back and see what happened, might help...

    Or before everything try something similar there are few more plugins doing the same job:

    http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/

    http://wordpress.org/extend/plugins/simple-auto-featured-image/

    http://wordpress.org/extend/plugins/auto-featured-image/

    but not sure those will help if auto-post-thumbnail didn't...

    Cheers

  13. d_alinus2004
    Member
    Posted 1 year ago #

    Hello,

    I don't have any image in the content of the post. I want to find one plugin that can help me to ad automatic the featured images in all the post. Because i have 900 post, and it's almost imposible for me to add one image in each post.

    Many renards and thank'you for help me.

  14. 3x7
    Member
    Posted 1 year ago #

    Do you have images on server and you would like to attach them to posts? (this is possible to do randomly, or filenames would have to be same as post slug or id in order to attach them to specific posts).

    I case you would just like to get thumbnail from "google" based on the post name, then this might help:

    It is HOWTO for "attach first image found on google as featured, based on post name"
    http://wordpress.stackexchange.com/questions/45529/retrieve-1st-image-in-post-and-set-it-as-featured-image-when-post-is-saved-upda

    I'm not really sure but there might be a plugin for this, but can't remember how it's called.

    Hope it helps, if not, I suggest you to check WP forums.
    Cheers!

  15. d_alinus2004
    Member
    Posted 1 year ago #

    Hello,

    Yes i have some image into my webserver, and i want to add in random the images in each post.

    Any ideea?

    Many regards

  16. 3x7
    Member
    Posted 1 year ago #

    I just found the one that gets images from google
    http://wordpress.org/extend/plugins/magic-post-thumbnail/

    Anyway here is a plugin which can attach images with specific fileNAME.

    http://wordpress.org/extend/plugins/auto-feature-image/

    You will have to bulk rename your files as required by plugin put "EW-" in front of every file, then upload to server and it should work...

    Cheers!

  17. paddu.iweb
    Member
    Posted 1 year ago #

    Hi sir am using elegant theme. I am adding featured images to posts and i want to display different thumbnails for post on home page. featured image on posts.

    Thank you.

  18. 3x7
    Member
    Posted 1 year ago #

    I suggest you to ask your theme developers, but if your posts have images inside the content then you can use some of the "automatic post thumbnails" plugins.

    If you want to attach images from google based on the title, then use the magic post thumbnails.

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic