php - Pagination not working properly on author and category archives -
i've made category page has pagination on bottom of it. everytime try go page 2, url structure changes posts loop not. pagination working fine blog page exact same loop. hints doing wrong? using wp-paginate plug in.
<ul class="blogpostings"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post();?> <li> <?php if ( has_post_thumbnail() ):?> <?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id, 'thumbnail', true); echo '<a href="' . get_permalink($post->id) . '" title="' . get_the_title($post->id) . '"><img src="' . $image_url[0] . '" title="' . get_the_title($post->id) . '" alt="' . get_the_title($post->id) . '" /></a>'; ?> <?php endif; ?> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="permanent link <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2><br/> <h3><?php the_author_posts_link(); ?> <span class="date">| <?php the_time('f d, y') ?> |</span> <?php comments_popup_link('post comment', '1 comment »', '% comments »'); ?> <fb:like href="<?php the_permalink() ?>" layout="button_count" width="100" font="lucida grande"></fb:like> </h3> <?php the_excerpt(); ?> <p class="postreadmore"><a href="<?php the_permalink() ?>" class="arrow"> read more </a></p> </li> <?php endwhile; ?> </ul> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <?php if(function_exists('wp_paginate')) { wp_paginate(); } ?> <?php } ?> <?php endif; ?> </div>
if using query_posts()
, make sure including paged
parameter. following should help: http://ivanasetiawan.com/wp-pagination-stays-on-the-same-page/
Comments
Post a Comment