[wp-trac] [WordPress Trac] #23948: Random for WP_Query

WordPress Trac noreply at wordpress.org
Fri Apr 5 13:15:27 UTC 2013


#23948: Random for WP_Query
-------------------------------+------------------------------
 Reporter:  Looimaster         |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Query              |     Version:  3.5.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by Looimaster):

 Server: http://wpengine.com/

 Image with my explanation to a person having difficulties:
 [[Image(http://gyazo.com/b1a4990b3a2f83cbda033b7874a0821e.png?1365167557)]]

 Test case:
 {{{
 <xmp>
 <?php $query = new WP_Query( array ( 'post_type' => 'portfolio', 'orderby'
 => 'rand', 'order' => 'DESC' ) ); var_dump($query); ?>
 }}}

 Note that this is a custom post type.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23948#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list