in my wordpress site, the_content() is not showing the content, but $post->post_content shows it, why this is happening? and how can I use the_content again?
Leave a Reply
You must be logged in to post a comment.
in my wordpress site, the_content() is not showing the content, but $post->post_content shows it, why this is happening? and how can I use the_content again?
You must be logged in to post a comment.
In order to use “the_content()” it must be used within The Loop.
See here: http://codex.wordpress.org/Function_Reference/the_content
“Displays the contents of the current post. This tag must be within The_Loop.”
If it worked before, it’s probably a plugin hooking into the_content filter. Disable your plugins one by one to see if this fixes the issue. Next, check the callback functions for
the_content
filter.You can see every callback for the_content by adding the following:
Find each of the functions listed by doing a ‘find in files’ code search on your code editor. A filter callback HAS TO return $content data back for the_content() to work properly.
you can check your functions.php in your theme folder,find if some function do something for the “the_content” function.my theme have the same problem,and I found a function has a mistake and cause “the_content” can’t work
find text like “the_content” in your functions.php,