i'm developing a related publish article feature for my wordpress enabled site.being a new comer to php and wordpress facing some problem. though i'm able to user wordpress build in feature to exhibit related publish of author consider website is hosting articles of authors who don't put on any profile around and you will find many such authors then when a brand new publish has been produced for that author we often save a custom area as author_email. so according to this you want to show all publish being released of the particual author.i attempted using get_posts() method

<?php 
        $args = array( 'meta_key' => 'author_email', 'meta_value' => 'XYZ@XYZ.com');
        $authorposts=get_posts($args); ?>
    <div id="content">
    <span class="breadcrumbs"><a href="<?php echo get_option('home'); ?>/">Home</a> &raquo; <?php the_category(', ') ?></span>
    <?php if (count( $authorposts ) > 0) {
    foreach ( $authorposts as $post ): setup_postdata($post)            ?>
    <div id="headline_author">
        /*
          showing post tilte with image and some part of it
        */
        <div class="clearfloat"></div>
    </div>
    <?php endforeach;  ?>
    <div class="post-nav">
                <div class="previous"><?php previous_posts_link('&lsaquo; Previous Page') ?></div>
                <div class="next"><?php next_posts_link('Next Page &rsaquo;') ?></div>
    </div>
   <?php
                    } else {
                        echo '<p>No articles by this user</p>';
                    }       
                    ?>
</div>

it showing the very first 5 results along with a link to another page however when i click the next page it show me it went to second page since it's also visible around the URL nevertheless its showing exactly the same 5 results what it really has proven in page one. i'm a concept the query i've written on a single page gets performed again right from the start although not sure how you can repair it. since i have am using cutom fields to obtain posts i'm able to use simple query to fetch publish in line with the limit or offse etc.

can anyone assist me to to repair the items or can point me hw to get it done in proper way

thanks ahead of time

I'm not word-press/php expert just began researching it. it appears that you simply haven't set the paged global variable through which it may track the page number.

you must do something similar to this.

$post_per_page = get_option('posts_per_page');
            if (!is_paged()) {
            $custom_offset = 0;
            } else {
            $custom_offset = $post_per_page*($paged-1); 
            }
            $args = array( 'meta_key' => 'author_email', 'meta_value' => xyz@xyz.com' ,'numberposts' => $post_per_page,'offset' => $custom_offset);