WordPress.org

Ready to get started?Download WordPress

Forums

Array multiple 'orderby' and 'order'. Date and views. Tips? tks (1 post)

  1. webipsum
    Member
    Posted 2 years ago #

    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',));
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags