Home › Forums › General Issues › Custom Scripts › Reply To: Custom Scripts
Hi @mdurchholz
Yes, it would affect all WYSIWYG editor. If you want to do it only for certain field, you can use the acf/load_value filter instead. It should be like this:
function my_acf_load_value( $value, $post_id, $field ) {
remove_filter('acf_the_content', 'wpautop' );
return $value;
}
// acf/load_value/name={$field_name} - filter for a specific value load based on it's field name
add_filter('acf/load_value/name=wysiwyg_editor', 'my_acf_load_value', 10, 3);
I believe the text area field won’t convert special chars like <>
. I’ve just tested it on my installation and it executed the script correctly. Maybe it has something to do with your theme, plugins or database encodings.
To check if it’s your theme or plugins fault, could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.
To check if it’s your database encodings fault, you need to get in touch with your hosting provider.
I hope this makes sense 🙂
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.