WordPress.org

Make WordPress Core

Ticket #3961: 3961.diff

File 3961.diff, 718 bytes (added by foolswisdom, 7 years ago)
  • wp-includes/general-template.php

     
    415415                } 
    416416        } elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) { 
    417417                ('alpha' == $type) ? $orderby = "post_title ASC " : $orderby = "post_date DESC "; 
    418                 $arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where $orderby $limit"); 
     418                $arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit"); 
    419419                if ( $arcresults ) { 
    420420                        foreach ( $arcresults as $arcresult ) { 
    421421                                if ( $arcresult->post_date != '0000-00-00 00:00:00' ) {