WordPress.org

Support

Support » How-To and Troubleshooting » Showing first 5 posts and more link for remaining posts in query_posts

Showing first 5 posts and more link for remaining posts in query_posts

  • Hi,

    I have set to display 240 posts in page such as http://www.alltimeplay.com/stunt/ I want to show first 5 posts and a more link. Clicking more link should display the remaining posts.

    I have gone through http://codex.wordpress.org/Customizing_the_Read_More but could not figure out a way.

    <?php $game = get_the_title($ID);   ?>
    
    			   <?php query_posts( array ( 'category_name' => $game ) ); ?>
                   <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                         <div class="slot2">
                              <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
                              <h2><a href="<?php the_permalink(); ?>"><?php echo the_title(); ?></a></h2>
                          </div>
                   <?php endwhile; endif; ?>
                   <?php wp_reset_query(); ?>

    Any help?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Showing first 5 posts and more link for remaining posts in query_posts’ is closed to new replies.