I’d like to stop parsing shortcodes in the_content
but I’m struggling to find what the correct filter would be. This didn’t work:
remove_filter( 'the_content', 'do_shortcode', 40 );
remove_filter( 'the_content', 'run_shortcode', 40 );
remove_filter( 'the_content', 'wpautop', 40 );
remove_filter( 'the_content', 'autoembed', 40 );
remove_filter( 'the_content', 'prepend_attachment', 40 );
This worked (but also disabled all other useful filters):
remove_all_filters( 'the_content', 40 );
So, I’d like to disable autoembed
and do_shortcode
and let WordPress display them as plain text. Would it be possible? I’m using wp
hook in main plugin’s PHP file.
The correct way is calling
remove_filter
with the same priority as the hook was added:Some plugins change this filterâs priority, so you could clear the global list of registered shortcodes temporary: