Support » Networking WordPress » no posts found in the loop

  • Hi everybody,

    i’m going crazy right now. I bet the solution is very simple but i just can’t see it right now.

    I set up a wordpress multisite and editing the default twentyeleven wp-theme right now.
    I added a few custom templates (used with pages) and want to get some posts in them.
    But for some reason the standard looping process doesn’t give me any results!

    shouldn’t this do the job?

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php echo 'test'; ?>
     <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    I always get back the “sorry, no posts…” message. Of course i included the header and footer.
    I actually tried copy&paste the whole index.php into the custom-template (used in a wp-page) but the loop can’t find any posts even though i added a few.

    Whats the problem?
    Thanks in advance
    Sincerely
    Sumit

  • The topic ‘no posts found in the loop’ is closed to new replies.