WordPress cannot output content using the The_content () method

Source: Internet
Author: User

In the use of WordPress in a page I use the The_content () method to output the contents of the current page, but the display is empty, and the title, URL, etc. no problem

On the network, it seems that people who encounter this kind of situation seldom find only one saying that it is possible to have functions covering the The_content method but I delete the function method or not, and then I delete the code and leave the phrase "<?php the_ Content ()?> "The result is still not, but the solution can only be solved by other means:Use the $post property in the image "<?php echo $post->post_content;? > "Here's what's in my page.php.
<?PHP/** Inside page/single page * @author HTL * @date 2014-01-28*/Get_header ();? ><?php Get_sidebar () ><div id= "Neirong" > <?phpif(Have_posts ()):?> the PHP the_content () method cannot output the content of the article bythe Post_content property in the $post object to output        //the_content ();//print_r ($post);        Echo $post->post_content;? > </div> <?phpElse:?> <?php get_template_part (' 404 ');? ><?phpendif;?></div><!--NeirongEnd--><?php Get_footer ();?>

Reference: WordPress the_content function No output content how can I avoid displaying empty the_content ()?



From for notes (Wiz)



WordPress cannot output content using the The_content () method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.