• Resolved keyaspects

    (@keyaspects)


    Hi, I’m trying to display the latest 3 post from a specific category.

    I have the following code so far, but this only displays the most recent post.(just 1)

    I’m yet to create a second category, but when I do I want to also display the 3 most recent posts from this category in the sidebar too.

    <div id="nav">
                <h2>Latest Posts</h2>
    
                <?php query_posts("post_per_page=1"); the_post(); ?>
    
    			<h3><?php the_date(); ?></h3>
    			<h4><?php the_title(); ?></h4>
    			<p><?php the_excerpt(); ?>
    			<br />
    			<a href="<?php the_permalink(); ?>" title="Read More About This News Item">[ Read More ]</a></p>
    
            </div>
    
            <?php wp_reset_query(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to display multiple latest posts from specific categories’ is closed to new replies.