[wp-hackers] double loop with single-page layout in the second loop
moraleida at gmail.com
Tue Aug 23 18:57:58 UTC 2011
I'd say perhaps the best way to achieve that is using a WP_Query object
instead of query_posts for your secondary loops.
See this ->
i've done a fair bit of secondary loops inside one single page, often using
different page templates and it works wonders for me.
2011/8/23 Leo Baiano <ljunior2005 at gmail.com>
> Personnel, single page I want to display the post and a box with the other
> posts in the same category. I can do this, but in this box, I want to
> display only six posts in the same category and include paging, there
> the problem because it ap
> pears on page single method get_query_var('paged') always returns 0.
> My query_posts this way:
> query_posts ('posts_per_page = 6 & cat = 34 & paged ='. get_query_var
> Always display the first 6 posts in category 34, when I click on the
> Pagination she goes to the address with final / page / 2 but then is
> redirected to the address of the post, not keeping the / page / 2 in the
> url. Query_post a Test like this:
> query_posts ('posts_per_page = 6 & cat = 34 & paged = 2'));
> and thus works, it shows the next six posts, but how to make this happen
> Could anyone give me a light?
> Leo Baiano
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers