How can I disable(remove) wpautop (wptexturize, convert_chars) for specific shortcodes only?

admin2025-06-04  11

I am having a trouble in disabling formatting for specific shortcode. For example, I have:

[MyTag]"hi"[/MyTag]

However, the output is “hi“ (note the formatted quotes). I want to disable any kind of formatting (and keep untouched) everything for that shortcode. But the below:

remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'convert_chars');

completely removes formatting from content and all other shortcodes. I ONLY want to affect [MyTag] shortcodes only. How can i achieve that?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749035183a315807.html

最新回复(0)