How to show 10 recent posts then show another 10 somewhere else on the page
-
I am trying to set up a home page for a client and what he would like is for the 10 most recent post to be visible and then using javascript have a show more button to then reveal the 10 after that.
The code for the 10 most recent posts are here including the divs and classes that everything is styled in:
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
<?php query_posts('cat=work&posts_per_page=10'); ?> <?php while (have_posts()) : the_post(); ?> <a>"> <div id="work-box"> <div style="position: absolute; background-color: #000;"> <?php the_post_thumbnail('thumbnail'); ?> </div> <div id="work-text-parent"> <div id="work-text"> <div id="work-title"><strong><?php echo get_post_meta(get_the_ID(), 'post_hover_title', true); ?></strong></div> <div id="work-pub"><?php echo get_post_meta(get_the_ID(), 'post_hover_pub', true); ?></div> </div> </div> </div> </a> <?php endwhile; ?> <?php wp_reset_query(); ?> </div>
If anyone has anything to suggest it would be more than helpful
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to show 10 recent posts then show another 10 somewhere else on the page’ is closed to new replies.