Viewing 1 replies (of 1 total)
  • I added this line of code, which fixed my site (made the archive page list in ascending order, which is what I wanted):

    function change_order($orderby, $query) {
    global $wpdb;
    if(is_archive())
    $orderby = “{$wpdb->prefix}posts.post_date ASC”;
    return $orderby;
    }
    add_filter(‘posts_orderby’,’change_order’);

Viewing 1 replies (of 1 total)
  • The topic ‘order doesn't work on my site’ is closed to new replies.