Title: Using a &quot;load more&quot; button
Last modified: August 30, 2016

---

# Using a "load more" button

 *  [wpuser131](https://wordpress.org/support/users/wpuser131/)
 * (@wpuser131)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/using-a-load-more-button/)
 * Hello everyone. I hope I am posting at the correct category.
 *     ```
       <div class="container">
         <?php foreach ( $myPosts as $post ) : setup_postdata( $post ); ?>
       	<div class="thumbnail"><a href="<?php the_permalink(); ?>">
       	<?php the_post_thumbnail('thumbnail' , array( 'class'	=> "aligncenter"));
                ?>
                       <div class="image-title"><?php the_title(); ?></div>
       	    </a>
               </div>
         <?php endforeach;
               wp_reset_postdata(); ?>
       </div>
       ```
   
 * Well the above code, creates a container, in which all the posts of a specific
   category are shown (this is addressed when I create $myPosts and works fine).
   The result is fine, but obviously when the posts of a category are too many, 
   the load page time increases. So I was thinking of using a “load more” button.
 * 1st question: Is this the appropriate way of reducing the page load time in this
   case?
 * 2nd question: How can I do this? I couldnt find an appropriate plugin, for this
   specific case, as I am showing the posts with my own code, without using a “posts
   page” or smth. If there is one and I haven’t noticed, then you ‘re most welcome.
 * Thanks!

Viewing 1 replies (of 1 total)

 *  [pipdig](https://wordpress.org/support/users/pipdig/)
 * (@pipdig)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/using-a-load-more-button/#post-6582325)
 * Check out Daniel’s [blog post](http://premium.wpmudev.org/blog/load-posts-ajax/)
   on using ajax to load more posts. It’s a great introduction to the topic and 
   well worth a read (or two).

Viewing 1 replies (of 1 total)

The topic ‘Using a "load more" button’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [pipdig](https://wordpress.org/support/users/pipdig/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/using-a-load-more-button/#post-6582325)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
