Last active
August 29, 2015 14:13
-
-
Save CoachBirgit/89ca526db0d3b799d0fb to your computer and use it in GitHub Desktop.
WordPress: make post-thumbnails responsive by default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* make post-thumbnails responsive by default */ | |
add_filter('post_thumbnail_html','tm_add_class_to_thumbnail'); | |
function tm_add_class_to_thumbnail($thumb) { | |
$thumb = str_replace('attachment-', 'img-responsive attachment-', $thumb); | |
return $thumb; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment