WordPress is built around the Loop, and all the cool kids are using multiple loops on the same page to show the main post and feature other posts. The problem is: WordPress doesn’t properly reset the $pages global for each post. If the post in main loop (or default query) is paged, then all the other posts will show the same paged content as in the main post. I started a ticket and submitted a patch, but in the meantime you might have to unset( $GLOBALS['pages'] )
in your custom loops just before calling the_post()
.
Post Loop By Category
Alex Bluesummers asked on a WordPress list: How do I order posts in the loop by whether or not it is in a category, then by date? Suppose I have 10 posts, of which 5 are in the category “Sports” and 5 are in the category “Blog News”. Both “Sports” and “Blog News” posts are […] » about 400 words