I'm using the following php code on a page to show 10 posts per page from a single category.
function my_page_of_posts5() {
if (is_page('10')) {
$custom_loop = new WP_Query('posts_per_page=10&cat=9');
echo '<div class="my-archives"><ul class="archive-list">';
if ( $custom_loop->have_posts() ) :
while ( $custom_loop->have_posts() ) : $custom_loop->the_post();
echo '<li><a class="archive-link" href="'
. get_permalink() . '">'
. get_the_title()
. '</a> <span class="my-comment-count">( ';
comments_number('0', '1', '%');
echo ' )</span></li>';
the_excerpt();
endwhile;
wp_reset_query();
endif;
echo '</ul></div>';
}
}
add_action('thesis_hook_after_content','my_page_of_posts5');
I'm using Thesis WordPress Theme Framework.
I want to display pagination after these posts on the page.
What code shall I put there to show the pagination?
I've tried using the WP-Paginate plugin and putting the wp-paginate(); function on the page but it doesn't work fine.
Need another way to sort it out.