wordpress :: Add CSS class to every image

Published by 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

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x