Definition:
function &query_posts($query) {}
Set up The Loop with query parameters.
This will override the current WordPress Loop and shouldn’t be used more than once. This must not be used within the WordPress Loop.
Parameters
- string $query
Return values
returns:List of posts
Source code
function &query_posts($query) { unset($GLOBALS['wp_query']); $GLOBALS['wp_query'] = new WP_Query(); return $GLOBALS['wp_query']->query($query); }
2633
No comments yet... Be the first to leave a reply!