Community Forums › Forums › Archived Forums › General Discussion › Use first post content image as featured image
Tagged: content image, featured image, post image
- This topic has 11 replies, 5 voices, and was last updated 11 years, 1 month ago by Brad Dalton.
-
AuthorPosts
-
December 11, 2013 at 9:30 am #78324dmdwebdesignsMember
I just imported another blog (wordpress.com) to my new WP website. And all my images are included in the content, there were no featured images assigned to each post.
How can I now... get the first initial image in the content area to be used as the "featured image" without having to edit each post individually?
Can Genesis do this? or do I need to install a plugin to tell the "featured image" area to look to the post instead?
Thanks for your assistance in advance.
December 11, 2013 at 11:17 am #78339nutsandboltsMemberYou can use a function to pull the first post image as the featured post. This tutorial gives you two functions, depending on whether your child theme is one of the new HTML5 themes or an older XHTML theme: http://www.wpstuffs.com/insert-featured-image-above-posts/
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 11, 2013 at 11:39 am #78352ElisaMemberThis didn't work for me, the images still didn't show. Are there any other options?
December 11, 2013 at 11:40 am #78353nutsandboltsMemberHi Elisa,
Can you post a link to your site and tell us a little more about your issue?
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 11, 2013 at 11:55 am #78361ElisaMemberHi,
I'm sorry, sure.
My site is at http://www.theunlikelyhousewife.com/
My current featured posts all contain images, but none is showing because I haven't gone and selected them one by one.
I would like to tweak is so that the first image that appears in each post is automatically selected as the featured image for that post on the homepage. I have tried including the function as listed in your reply to the original poster, but the images still didn't show. Could that be because they are not uploaded on the same server as the blog, but being remote-linked to on sites like Flickr and Photobucket?
December 11, 2013 at 12:17 pm #78365dmdwebdesignsMemberHi Nuts and Bolts... sorry this did not work for me either. I tried both sets of code. I cannot post a link as I have a Coming Soon plugin so you will not be able to see the website or the category page I am referring to.
Any other possible suggestions?
December 11, 2013 at 12:32 pm #78370dmdwebdesignsMemberI think I know what the issue is... I imported these posts and the images are NOT being put into the typical image folders. So there are no thumbnails and even if I use the regenerate thumbnails plugin, it does not find any uploaded images so it does note regenerate anything.
When I import, if I check off the box for download file attachments, it bogs out and sends to be a "page not found". If I import without that option, everything works but the images are not added to the media library.
So how do I get these images into the Media Library?
Need to figure this out...
December 11, 2013 at 12:43 pm #78376dmdwebdesignsMemberOkay... this time images were added during the import. I am running the Regen. Thumbnails plugin again and this time it worked.
Have a feeling after this is done, that the featured images will now show up as long as I have the code in the Functions.php
I will keep you posted.
December 11, 2013 at 1:05 pm #78386dmdwebdesignsMemberSorry to say... regenerating the thumbnails and addition of the code to the functions.php file did NOT help.
December 11, 2013 at 1:12 pm #78389nutsandboltsMemberYou may need to change "post-image" in the function to whatever your theme is using as the name for the featured image size. What child theme are you using?
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 13, 2013 at 7:51 pm #78952davidzackMemberI think I'm trying to do the same thing. If a post has a Featured Image set, the thumbnail appears on the side of the teaser in the loop. But if the post does not have a featured image, I'd like the loop to use the first image in the post's body. Can't seem to figure out how to add that behavior.
December 13, 2013 at 8:13 pm #78959Brad DaltonParticipantIf your theme is running HTML 5, it will use the first image in the post as your featured image if not added manually.
Or you can auto set it using different methods http://wpsites.net/wordpress-tips/auto-set-featured-image/
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.