Support » Developing with WordPress » Having issues displaying loop on homepage

  • Resolved dnk3232



    I am new to PHP and am new to the loop. I have created a static homepage, and wish to display my blog feed on my homepage (website can be found here

    For my homepage, I created a home-page.php template to use. In the template I added the following code:

    	  if (have_posts()) :
    	  while (have_posts()) : the_post();
    	  else :
    	  echo '<p>No posts to display</p>';

    Which to my understanding is the start of a very simple loop. When I view my homepage, nothing is showing. I have test posts so I am unsure why nothing is being pulled.

    I’d appreciate any help as to why this it’s not showing and if I have done something wrong, as I cannot see anything wrong with my code so far.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Having issues displaying loop on homepage’ is closed to new replies.