Dave Dave - 6 months ago 30
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(); ?>


@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; ?>