Opened 18 years ago
Closed 18 years ago
#8855 closed defect (bug) (invalid)
order=ASC shows all posts
| Reported by: | scribu | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.7 |
| Severity: | major | Keywords: | reporter-feedback |
| Cc: | Focuses: |
Description
Doing query_posts('order=ASC') returns all posts, ignoring the other query vars (author, tag etc.)
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
If you're simply using "query_posts('order=ASC');" then yes, That returns all posts, query_posts() doesnt take into account current query vars, it completely rests it.
You could use something like:
query_posts( array_merge($GLOBALS['wp_query']->query_vars, array('order' => 'ASC')) );to achieve what you're after i think
Has this changed from an earlier version of WP?