WordPress.org

Support

Support » How-To and Troubleshooting » The Loop Not Working in Blog Template

The Loop Not Working in Blog Template

  • I have created several pages one of which is a blog using the standard loop syntax (which I grabbed from index.php) in its template. The problem I have is that it only displays 1 post – not even the first or last post but what appears to be a random post (to me). I then created a ‘new’ blog page using the same template and it is showing another post altogether. As a stop gap until I figure out why I can’t use The Loop, I have managed to get the blog template to show more than 1 post by calling <?php query_posts('showposts=10'); ?> which is OK but what happens when there is more than 10? I’m a bit lost…! 🙂

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • created several pages

    Are we talking here about Pages? – then read the docs: Pages are designed to display ONE content entry.
    Instaed of saying the Loop is not working (which is completely not true!) you should rather describe what is ti you want to do. Not how! WHAT. And then we might be able to tell you the “how”.

    If the documentation was a bit clearer about what you can and can’t do I would have been OK. I figured it out. I never suggested The Loop doesn’t work rather it wasn’t working in the context I was using it in. Thanks for your PATIENCE and UNDERSTANDING…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The Loop Not Working in Blog Template’ is closed to new replies.
Skip to toolbar