Wordpress Image in Content add class


/ Published in: PHP
Save to your folder(s)

Adds a class to the standard classes in Images in Posts/Pages


Copy this code and paste it in your HTML
  1. function bb_add_image_class($class){
  2. $class .= ' scale-with-grid';
  3. return $class;
  4. }
  5. add_filter('get_image_tag_class','bb_add_image_class');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.