Thread Starter
hikzik
(@hikzik)
@davidsword — Thanx a lot…But i found it out.
This code worked great for me.!
<?php
$ppp = get_option('posts_per_page');
if (!is_paged()) {
$custom_offset = 0;
} else
{
$custom_offset = $ppp*($paged-1);
}
$args = array(
'numberposts' => $ppp,
'offset' => $custom_offset,
);
global $post; $myposts = get_posts($args);
?>
For the full explanantion its down here at this link:http://blog.ashfame.com/2011/04/pagination-approach-get-posts-wordpress/
Thread Starter
hikzik
(@hikzik)
sorry my bad…
I am getting the changed url (ie: ../page/2/) as you mentioned, but my code displays the same posts.
$my_older_posts = get_posts('offset=10');
How should i be coding this such that WordPress understands its older pages.?
i.e How to differentiate between First page and older pages.?
am still a noob when it comes to wordpress.
Thanks a lot in advance and really appreciate your help.