Load more posts
-
Hi there,
I have bitten off more than i can chew regarding a website request from a client.
They are wanting to have a ‘Load More’ button at the bottom of a row of 3 posts.
When the ‘View More’ button is clicked it loads another row of 3 posts.
I have the code currently pulling in the posts. Beyond that, I am stumped. Can someone point me in the right direction?
<div id="posts-bottom"> <ul> <?php $cat_name = 'Secondary';?> <?php query_posts('category_name='.$cat_name); ?> <?php while (have_posts()) : the_post(); ?> <li> <div id="posts-bottomitem" align="center"> <a href="<?php the_permalink(); ?>"><?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?></a> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <p><?php $content = get_the_content(); $content = strip_tags($content); echo substr($content, 0, 150); ?></p> </div> </li> <?php endwhile;?> </ul> </div> <div id="break"><div id="viewmore">View More</div></div>
Thank you for any help,
P
- The topic ‘Load more posts’ is closed to new replies.