2011-09-01 59 views

回答

1

使用插件WP-PageNavi - 下面的示例代碼:

<?php get_header(); ?> 

<!-- Start Loop --> 
<?php query_posts('category_name='SomeCategoryName'&orderby=title&order=ASC&paged='. get_query_var('paged')); ?>   

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 

    <?php //Loop Code Here ?> 

    <?php endwhile; else: ?> 
     <p class="error">No results found.</p> 
    <?php endif; ?> 

    <!-- Start Pagination - WP-PageNavi --> 
    <div id="pagination"> 
      <?php wp_pagenavi(); ?> 
    </div> 
    <!-- End Pagination --> 

<?php wp_reset_query(); ?> 
<!-- End Loop --> 

<?php get_footer(); ?> 
+0

謝謝你一噸dciso。它使我的工作更容易。 –