Skip to content

Instantly share code, notes, and snippets.

@paaljoachim
Last active September 12, 2018 10:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paaljoachim/857644243e033668101615e14d85bb69 to your computer and use it in GitHub Desktop.
Save paaljoachim/857644243e033668101615e14d85bb69 to your computer and use it in GitHub Desktop.
Set Featured image. 1. Sets the featured image. 2. If no featured image get image from category. 3. If no category image then get the first post image. 4. If no post image or category image then sets a fallback image.
@paaljoachim
Copy link
Author

paaljoachim commented Jul 2, 2016

Is a bit glicthy... during testing the browser Chrome/Firefox did not refresh after a code change. I had to use code to remove featured images and then test another piece of code. This did not happen with the Genesis featured image code snippet.
https://gist.github.com/paaljoachim/2adcc2fc7eae059d5be47a4ccb77aa86

What I want to do is add code to the Genesis snippet so that it can be added to a functions file for most themes not just Genesis themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment