Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Override post thumbnail attributes in your WordPress theme
$post_thumbnail_attributes = array(
'class' => 'our-image-class maybe-add-another-class',
'alt' => get_the_title(),
'title' => get_the_title()
the_post_thumbnail( 'post-thumbnail', $post_thumbnail_attributes );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.