How to automatically set the first image of a WordPress post as the featured image

This snippet automatically sets the featured image by fetching the first image of the WordPress post.
*Note – if you choose a featured image, that will be displayed instead.

Instructions:
Add this to the functions.php file

Related links:
http://wpforce.com/automatically-set-the-featured-image-in-wordpress/

Comments

One Reply to “How to automatically set the first image of a WordPress post as the featured image”

Leave a Reply

Your email address will not be published. Required fields are marked *

Snippet Info

Tested with Wordpress v. NA
Review Status: Needs Review

How to automatically set the first image of a WordPress post as the featured image
4.6 (92.41%) 29 votes
Please report broken snippets.
Report Broken Snippet
SE Ranking