The function that parses the shortcode, do_shortcode
is added as a filter on the_content
by default, at priority 11.
You can remove it using remove_filter
:
remove_filter( 'the_content', 'do_shortcode', 11 );
Call this right before you’re actually using the_content
, and add it afterwards (in the unlikely case that it’s needed after that):
remove_filter( 'the_content', 'do_shortcode', 11 );
the_content():
add_filter( 'the_content', 'do_shortcode', 11 );