Ready to get started?Download WordPress


Loop not displaying posts. (2 posts)

  1. low_stress
    Posted 7 years ago #

    Hi I am trying to write a loop that will display all the print and media 'press' clipping that have been recieved.

    So, I am just want to loop two categories(print and media) on a page devoted to that content.

    I am using a the default loop but it is not displaying *any* posts. What am I missing?

    Template Name: Press Loop
    <?php get_header(); ?>
    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h1>" rel="bookmark"><?php the_title(); ?></h1>
    Posted on <?php the_time('F j, Y'); ?>

    <?php the_content(__('Read more'));?>
    <div id="meta">
    Filed Under <?php the_category(', ') ?> | <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>


    <!-- <?php trackback_rdf(); ?> -->

    <?php comments_template(); // Get wp-comments.php template ?>
    <?php endwhile; else: ?><?php endif; ?>
    <div class="navigation">
    <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div>

    <!-- The main column ends -->
    <?php get_footer(); ?>

    Any help would be kindly appreciated.


  2. MichaelH
    Posted 7 years ago #

    Put something like this before your if have(posts) logic:



Topic Closed

This topic has been closed to new replies.

About this Topic