[wp-trac] [WordPress Trac] #16967: Adding cat=-# removes sorting
WordPress Trac
wp-trac at lists.automattic.com
Fri Mar 25 17:40:01 UTC 2011
#16967: Adding cat=-# removes sorting
--------------------------+------------------------------
Reporter: jdingman | Owner: scribu
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.1
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Changes (by scribu):
* owner: => scribu
* status: new => reviewing
Old description:
> When adding in cat=-20, it stops sorting
>
> $my_query = new
> WP_Query('cat=-20&posts_per_page=10&orderby=date&order=DESC');
>
> when I run it like this:
>
> $my_query = new WP_Query('posts_per_page=10&orderby=date&order=DESC');
>
> it works like I expect it will.
>
> I tested it in the array format as well, and adding category__not_in
> removes the sorting I add to it
New description:
When adding in cat=-20, it stops sorting
{{{
$my_query = new
WP_Query('cat=-20&posts_per_page=10&orderby=date&order=DESC');
}}}
when I run it like this:
{{{
$my_query = new WP_Query('posts_per_page=10&orderby=date&order=DESC');
}}}
it works like I expect it will.
I tested it in the array format as well, and adding {{{category__not_in}}}
removes the sorting I add to it
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16967#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list