I am using apply_filters('the_content)
so I can see properly formatted content inside my wp editor in the backend.
However, this also renders the shortcode that’s in the content.
I want it to ignore the shortcode and apply filtering to the rest of the content, basically the same thing as when making posts. If you view post content in the backend, you will see the shortcode, but if you view it inside a page on your website, you will see the rendered shortcode (its result).
Is this possible?
The function that parses the shortcode,
do_shortcode
is added as a filter onthe_content
by default, at priority 11.You can remove it using
remove_filter
:Call this right before you’re actually using
the_content
, and add it afterwards (in the unlikely case that it’s needed after that):