Skip to content

Instantly share code, notes, and snippets.

@vyatri
Created March 3, 2013 08:17
Show Gist options
  • Save vyatri/5075296 to your computer and use it in GitHub Desktop.
Save vyatri/5075296 to your computer and use it in GitHub Desktop.
Here’s a quick snippet of code you can throw into your functions.php file that will your theme automatically set it to the first available image. Note, you can always go and set another image as the featured image if you want to. It checks to see if a featured image exists and if it doesn’t, picks the first one. Snippet from http://wpforce.com/a…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment