Add Pagination to a Taxonomy- Page
-
I have no idea how to add Pagination to this Taxonomy page. I forget where I got the code for the taxonomy page, but it worked so I stuck with it. This is a taxonomy Archive page.
I found some code online to make a pagination… and it makes sense in a normal page function… but I’m not sure how to tie it in with this $term “hack” or whatever you want to call it.
The pagination code that’s in there is from the developers code and didn’t work on this page.
<? /* Page: Core News */ include( TEMPLATEPATH . '/modules/header.php');?> <? include( TEMPLATEPATH . '/modules/top.php');?> <? include( TEMPLATEPATH . '/cnews-sidebar.php');?> <h1 class="corenewstitle">Welcome to Core News!</h1> <section id="corenews"> <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?> <div class="cnewsentry"> <h1 class="cnewshead"> <a>" title="<?php the_title(); ?>" rel="bookmark"> <?php the_title(); ?> </a> </h1> <p class="cnewsmeta"> Posted on <? the_date(F-j); ?> under <?php echo get_the_term_list( get_the_ID(), 'cnews') ?> </p> <p class="cnewsbody"> <!-- The Post Image --> <div class="cnewsthumb"> <?php if(get_post_meta($post->ID, "corenews-image", $single = true) != "") : ?> <img src="<?php echo get_post_meta($post->ID, "corenews-image", $single = true); ?>" alt="<?php the_title(); ?>" /> <?php endif; ?> </div> <? the_excerpt(); ?> </p> </div> <? endwhile; ?> <div class="clearfix pagination"> <?=paginate_links(array( "base" => @add_query_arg('page','%#%'), "total" => $corenews->max_num_pages, "current" => $current, "type" => "list" )); ?> </div> <? endif; ?> </section> <? include( TEMPLATEPATH . '/modules/footer.php');?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add Pagination to a Taxonomy- Page’ is closed to new replies.