Is there a way where I can get the default output of the_content in WordPress post? Some of the plugin is using add_filter to the content to add their desired result like related post plugins where they add the result at the end of the content of a post. What I want to happen is to get the default formatting functions of WordPress core without any additional filters from other plugins.
3 comments
Comments are closed.
You can use remove filter function.
For more please refer below link
https://codex.wordpress.org/Function_Reference/remove_filter
You can use
the_content
filter itself to get the post object or the content , you can modify it or you can unhook it and again hook it as per your requirement .If I have understood your requirement this link will help you, if you need something different please ask me.
Guys thanks for responding to my question I think I got it somehow but need to run more test. What I did was I replicate the process on how
the_content()
function of WordPress work. Base from my research there are 10 default filters coming from WordPress core you can see on this link: read hereI just created my own function like
the_content()
from WordPress and apply the default filters to my own function. Put this code in your functions.phpThen for example in your single page template(single.php) instead of using the usual the_content I can use my function
default_post_content();
. Now I don’t need to worry about any of the plugins that create additional data tothe_content()
function.