Dave Dave - 3 years ago 81
PHP Question

How do I display a wordpress page content?

I know this is really simple but it just isn't coming to me for some reason and google isn't helping me today.

I want to output the pages content, how do I do that?

I thought it was this:

<?php echo the_content(); ?>

Answer Source

@Marc B Thanks for the comment. Helped me discover this:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post();
endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download