Home › Forums › General Issues › How I can fix problem with ACF WP Redactor? › Reply To: How I can fix problem with ACF WP Redactor?
You can use add_filter( 'get_image_tag_class', '__return_empty_string' );
To remove all classes
You can also use
add_filter('get_image_tag_class','add_custom_image_class');
function add_custom_image_class($class){
$class .= ' news__img';
return $class;
}
To add new classes. This only works when adding images after the code is in place not to existing images.
Alternatively, you could look to use jQuery and do a find/replace on the class
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.