• Resolved hearkening

    (@hearkening)


    I’d like to show the last post in 3 specific categories on my front page. Here’s what I have so far:

    <?php query_posts('orderby=name&order=asc&category_name=upcoming-events&showposts=1'); ?>
    		<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    
    			<div class="category">
    				<h2><?php the_category(); ?></h2>
    				<span class="date"><strong>Last Updated</strong>: 07/14/2009</span>
    				<div class="post">
    					<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    					<?php the_content(); ?>
    				</div><!-- / .post -->
    			</div><!-- / .category -->

    That works great, but I’m not sure how to show the other two categories. I’m a complete PHP noob. When I try to sort of duplicate this I get PHP errors with the loop. Any help would be greatly appreciated. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Most Recent Post in all Cats’ is closed to new replies.