Hi there, i'm trying to find a way to comment to your blog but no luck. And since i find you, you might wanna shed me some light. Im creating a custom author page which displays his list of posts....here's the code
<code>
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$authloop = new WP_Query("ID=$uid&paged=$paged");
$ppp = 5; //custom number of post to appear
$uid = $curauth->ID;
$args = array(
'numberposts' => $ppp,
'author' => $uid,
'paged' => $paged
);
$authorposts = get_posts($args);
if ( count( $authorposts ) > 0 ) {
foreach ( $authorposts as $post ): setup_postdata($post)
?>
<li>
<?php if ( has_post_thumbnail() ) : ?>
<img src="<?php echo bloginfo('template_url'); ?>/inc/scripts/timthumb.php?src=<?php echo catch_that_image(); ?>&w=40&h=40&zc=1&q=30" alt="<?php the_title(); ?>" class="authorpostimg"/>
<?php else : ?>
<img src="<?php echo bloginfo('template_url'); ?>/inc/scripts/timthumb.php?src=<?php echo catch_that_image(); ?>&w=40&h=40&zc=1&q=100" alt="<?php the_title(); ?>" class="authorpostimg"/>
<?php endif; ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="authorpostlink"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
</li>
<?php
endforeach;
wnw_authpagination($authloop->max_num_pages);
} else {
echo '<p>No articles by this user</p>';
}
?>
</code>
The code is working. However, the pagination get's the total number of page overall and not for the specific author . For example, the blog has overall post of 30 and user Charles has 10 posts, so it should be showing 2 parts of page.....but mine is showing upto page 6....