Output The Featured Image in a Loop as a Linked Media Image

Feature Image Loop

Instead of linking a featured image to a post permalink in a loop – here is how you can link to its original image of itself. https://gist.github.com/neilgee/b5df702da5ef092b4cd48d57dec32768 So above, the title and featured image is output of a post -…

Add a Class to a Featured Image in WordPress

add-class-featured-image

You can add a CSS class to a featured image in WordPress using an array in the_post_thumbnail   if( has_post_thumbnail() ) { //Add in featured image & class the_post_thumbnail( ‘featured-podcast’, array( ‘class’ => ‘alignnone’ ) ); } This can be…