[wp-hackers] double loop with single-page layout in the second loop

Leo Baiano ljunior2005 at gmail.com
Tue Aug 23 18:25:41 UTC 2011

 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 starts
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

More information about the wp-hackers mailing list