WordPress.org

Support

Support » How-To and Troubleshooting » Array multiple 'orderby' and 'order'. Date and views. Tips? tks

Array multiple 'orderby' and 'order'. Date and views. Tips? tks

  • Hi.
    I would like before orderby=date and to then sort by views.
    How should I implement?
    Tks.

    <?php query_posts(array(
       'cat' => '3,8,13,18',
       'showposts' => '5',
       'meta_key' => 'views',
       'orderby' => 'meta_value_num',
       'order' => 'DSC',));
    ?>
  • The topic ‘Array multiple 'orderby' and 'order'. Date and views. Tips? tks’ is closed to new replies.
Skip to toolbar