Support » Fixing WordPress » Showing first 5 posts and more link for remaining posts in query_posts

  • ParamasivanPN

    (@paramasivanpn)


    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)
  • esmi

    (@esmi)

    Forum Moderator

    240 posts in one page? Seriously?

    ParamasivanPN

    (@paramasivanpn)

    It is only thumbnail and the post title links. No contents.

    esmi

    (@esmi)

    Forum Moderator

    I think you’ll need to start digging into to some jQuery to achieve this as you seem to want to the page to be updated to show the remaining 235 posts dynamically.

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.