you have probably already read this:
http://codex.wordpress.org/Function_Reference/query_posts#Pagination_Parameters
it is not very clearly documented how to do pagination with custom queries.
this article might be a bit clearer:
http://stylizedweb.com/2008/08/13/query_posts-pagination-problem/
and imho, pagination does not work with ‘offset’ in the same query;
you may need to find a different method to exclude tht first post – such as saving the id of the first post in a variable and using
‘post__not_in’ => array(6,2,8) – exclusion, lets you specify the post IDs NOT to retrieve
http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters
thanks for the reply alchymyth. Tried out the methods described on that blog as well as the post_not_in (which worked by excluding the post) but both still had repeating posts in pagination.
Pretty stumped on multiple loops right now, but maybe a better look at what I’m trying to do in general.
Latest Post
– Get’s the latest (1) Post and displays it a certain way.
Featured Posts
– Get’s posts in the Category featured, and limits the display to 3 posts styled in a certain way..
Posts
– Excludes the first post, and the category of featured posts.
– Is the only loop with prev/next pagination links.
So far all the ways I’ve tried just has the same set of posts display page after page.
and thanks again for the quality reply!
can you ‘pastebin’ the latest version of your php file ?
Yep, http://pastebin.com/93CCQ4kB
sorta re-did some of the changes I made, but that’s where it’s at and not working
thanks again!
First off, add wp_reset_query()
after each query.
2nd, query_posts + pagination + offset doesn’t work well if you don’t know your way around. See: http://weblogtoolscollection.com/archives/2008/06/19/how-to-offsets-and-paging/
Hey Zeo, no luck still.
I removed offset completely, just using post_not_in, and adding wp_reset_query like you suggested, and still the posts repeat:
http://pastebin.org/171665
http://lalawag.com/beta/
see whether this work:
query_posts(array('post__not_in' => $ids, 'paged' => $paged));
and please use posts_per_page
instead of showposts
Hey Zeo,
thanks for the help! That seemed to fix the problem