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(); ?>
If you need to get the page ID you can easily do this by logging into your WordPress website admin and opening the page, post or custom post type for editing. The page id is visible in the address bar as shown in the screenshot below.
If you want your posts to show up on the home page and WordPress isn't already doing this for you, here's how you do it. In the WordPress admin, go to Settings > Reading. Find the section called Your homepage displays and select the Your latest posts option. Click the Save Changes button and go back to your home page.
Firstly, login to your WordPress admin dashboard, then click on 'Settings > Reading'. Next, select the “Your latest post” option under the 'Homepage displays' settings. After that, click on save changes. This is the easiest method of showing posts on your home page in WordPress.
List All WordPress Posts on Your Homepage. If you'd like all your posts displayed on your front page along with the content of the posts, you can easily do that by going to the Reading Settings screen (Settings > Reading) and changing the number of posts to show to something more than the number of posts you have.
@Marc B Thanks for the comment. Helped me discover this:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); the_content(); endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With