Custom category page not paginating properly
-
I have a custom category template (i.e. category-events.php) setup and it works fine except when I try to go to the next page. It just repeats the same posts from the first page of the category and displays the option to “go back”.
Here is the code I am using on the custom category page:
<?$my = new WP_Query('category_name=Previous Events&showposts=5&orderby=date&order=DESC')?> <?php if ($my->have_posts()) : ?> <div class="events previous"> <h2><?php if(function_exists('bcn_display')) {bcn_display();}?></h2> <div class="holder"> <?php while ($my->have_posts()) : $my->the_post(); ?> <?$more=0?> <div class="event"> <?if (get_post_meta(get_the_ID(), "Little Image", true)):?> <div class="holder-img"> <a href="<?php the_permalink()?>"> <img src="<?php echo get_meta_image_url(get_post_meta(get_the_ID(), "Little Image", true))?>" width="100" height="100" alt="#" /> <?if (get_post_meta(get_the_ID(), "Date Small", true)):?> <span class="date"><?php echo get_post_meta(get_the_ID(), "Date Small", true)?></span> <?endif;?> <span class="b-shadow"><span> </span></span> </a> </div> <?endif;?> <div class="text-hold"> <h3><a href="<?the_permalink()?>"><?the_title()?></a></h3> <span class="event-date"><?php echo get_post_meta(get_the_ID(), "Date Large", true)?> |</span> <?the_excerpt()?> <span class="links"><a href="<?php the_permalink()?>">Read more</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><?php the_tags(' | Sponsored by: ', ', '); ?> </span> </div> </div> <?endwhile;?> </div> </div> <?endif;?> <div class="navigation"><p><?php posts_nav_link(); ?></p></div>
Thanks for any help!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Custom category page not paginating properly’ is closed to new replies.