Tag Archives: query_posts

WordPress query_posts() References

Some good reference pages for WordPress’ query_posts() functionality.

WordPress function reference -> http://codex.wordpress.org/Function_Reference/query_posts

Quick overview of what it does -> http://ifelse.co.uk/archives/2005/03/31/query_posts/

Always to be used with wp_reset_query(). -> http://codex.wordpress.org/Function_Reference/wp_reset_query

query_posts() is the easiest way to alter the default query that WordPress uses to display posts. Use query_posts() to display different posts than those that would normally show up at a specific URL.

It is not only used to display different posts than what is displayed by standard functionality, it can be used to display WordPress posts in different order. Example: display pages or a post category that contains posts that do not follow a typical blog layout (ex: a listing books or authors in alphabetical order).