wordpress :: Add CSS class to every image

Published onesixx on

https://wordpress.stackexchange.com/questions/108831/add-css-class-to-every-image

http://onesixx.com/wordpress-add_filter/

 

function add_image_class($class){
    $class .= ' additional-class';
    return $class;
}
add_filter('get_image_tag_class','add_image_class');

 

 

function add_image_class($class){
    $class .= ' i';
    return $class;
}
add_filter('get_image_tag_class','add_image_class');

 

 

 

 

Categories: BLOG

onesixx

Blog Owner

Leave a Reply

Your email address will not be published.