Welcome to the Treehouse Community
Looking to learn something new?
WordPress Loop - content not appearing
Websites > How to Build a WordPress Theme > WordPress Theme Functions > The WordPress Loop
Copied all the code into the front-page.php and home.php. Refresh the page and all that's there is -
This is the header
This is the front-page.php file
This is the footer
I'm sure I have followed everything to the letter and the loop is not getting seen.
How can I debug this?
I get the same.
<?php get_header(); ?>
<p>this is the frontpage</p>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; else: ?>
<h3><?php the_title(); ?></h3> <?php the_content(); ?> <hr>
<?php endif; ?>
<p>there are no posts to show</p>
<?php get_footer(); ?>
is my code
I did the exact same thing too from the video. Same code and my page went blank!! Please help!