[wp-trac] [WordPress Trac] #13365: WP_Query, author_name, and sticky posts
WordPress Trac
wp-trac at lists.automattic.com
Sat Nov 13 22:09:01 UTC 2010
#13365: WP_Query, author_name, and sticky posts
--------------------------+-------------------------------------------------
Reporter: eryanv | Owner: ryan
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 2.9.2
Severity: normal | Keywords: sticky, loop, author
--------------------------+-------------------------------------------------
Description changed by scribu:
Old description:
> I have a template which is being used as my front page on WP 2.9.2. In
> this template I setup my loop with the following code:
> {{{ $postresults = new WP_Query();
> $postresults->query("author_name=frontpage&post_types=post&post_status=publish");
> while($postresults->have_posts()) { $postresults->the_post(); ?>
> // etc...
> }}}
> I am not using the "caller_get_posts=1" option, but my sticky posts are
> still showing up in order with other posts rather than at the beginning.
> If I remove the "author_name=frontpage" the sticky posts will move back
> to the first items, however I am stuck with posts by authors I do not
> want. Using "author=2" results in the same behavior as using
> "author_name".
New description:
I have a template which is being used as my front page on WP 2.9.2. In
this template I setup my loop with the following code:
{{{
$postresults = new WP_Query();
$postresults->query("author_name=frontpage&post_types=post&post_status=publish");
while($postresults->have_posts()) { $postresults->the_post(); ?>
// etc...
}}}
I am not using the "caller_get_posts=1" option, but my sticky posts are
still showing up in order with other posts rather than at the beginning.
If I remove the "author_name=frontpage" the sticky posts will move back to
the first items, however I am stuck with posts by authors I do not want.
Using "author=2" results in the same behavior as using "author_name".
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13365#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list