Make WordPress Core

Ticket #247: 247.patch

File 247.patch, 979 bytes (added by skippy, 21 years ago)
  • template-functions-general.php

     
    353353                                        }
    354354                                }
    355355                }
    356         } elseif ( 'postbypost' == $type ) {
    357                 $arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
     356        } elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) {
     357                ('alpha' == $type) ? $orderby = "post_title ASC " : $orderby = "post_date DESC ";
     358                $arcresults = $wpdb->get_results("SELECT ID, post_date, post_title FROM $wpdb->posts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY " . $orderby . $limit);
    358359                if ( $arcresults ) {
    359360                        foreach ( $arcresults as $arcresult ) {
    360361                                if ( $arcresult->post_date != '0000-00-00 00:00:00' ) {
     
    653654        echo $the_weekday_date;
    654655}
    655656
    656 ?>
    657  No newline at end of file
     657?>