[wp-trac] [WordPress Trac] #11698: have_posts should not auto rewind
WordPress Trac
wp-trac at lists.automattic.com
Mon Jan 18 21:33:49 UTC 2010
#11698: have_posts should not auto rewind
--------------------------------------+-------------------------------------
Reporter: mwillberg | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: General | Version:
Severity: minor | Resolution:
Keywords: dev-feedback 2nd-opinion |
--------------------------------------+-------------------------------------
Comment(by TobiasBg):
You can achieve the same output as in your example with one loop:
{{{
$tmp=5;
while ( have_posts() ) {
if ( $tmp > 0 ) {
the_post();
// output the post and decorate it with blinking lights
$tmp--;
} else {
the_post();
// output normally
}
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11698#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list