How to Only Show 3 Posts (PHP Coding)
-
Hello – I am using the code below. How do I modify it so that it only displays the latest three posts? Thanks for your help!!
<?php query_posts('category_name='.get_the_title()); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div> <h3><?php the_title(); ?></h3> <p><?php the_content(); ?></p> </div> <?php endwhile; else: ?>no match<?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to Only Show 3 Posts (PHP Coding)’ is closed to new replies.