• Resolved mwselz

    (@mwselz)


    I have the following code on page in order to display the latest posts in a single category there:


    <?php query_posts('category_name=News'); //where main is the name of the category that you want to show.
    ?>
    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <small>Posted <?php the_date('','',''); ?> at <?php the_time() ?>.</small>

    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <small><?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></small><br /><br />
    </div>

    </div>

    <?php endwhile; ?>
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>

    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>
    <?php endif; ?>

    The page is “home.php,” designated as my site’s home page through the use of the Filosofo Home Page Control Plugin.

    Pre-2.1, this would display the latest posts from my News category. Now, it reverts to the “Not Found” message.

    Anyone know what might have changed in 2.1 to cause this, and how I can fix it?

    Many thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘2.1 query_posts issue’ is closed to new replies.