Why is the_content() not displaying the content?

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?

Related posts

Leave a Reply

3 comments

  1. 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:

    add_action('template_redirect', 'wpse_44152_template_redirect');
    function wpse_44152_template_redirect(){
        global $wp_filter;
        print_r($wp_filter['the_content']);
    }
    

    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.

  2. 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,