[Resolved] Last post in a loop
I’d like to display my latest post in my loop a little different than the rest. I’d like to get to a solution without using post_per_page or showposts.
This my code:
<?php query_posts('cat=21'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>, <?php endwhile; else: ?> <?php endif; wp_reset_query(); ?>
As you can see there is a ‘,’ at the end of the link in the loop. In the latest post that is suppost to be ‘.’.
Hoping for help.
- The topic ‘[Resolved] Last post in a loop’ is closed to new replies.