recentpopularlog in

laurakalbag : image   45

Add Post Class if Post has thumbnail | WordPress Snippets
// add class if post has thumbnail
function has_thumb_class($classes) {
global $post;
if( has_post_thumbnail($post->ID) ) { $classes[] = 'has_thumb'; }

return $classes;
}
add_filter('post_class', 'has_thumb_class');
post  class  thumbnail  featured  image  wordpress  functions.php 
february 2012 by laurakalbag

Copy this bookmark:





to read