WordPress.org

Support

Support » How-To and Troubleshooting » Order by multiple meta keys on wordpress

Order by multiple meta keys on wordpress

  • After multiple research I didn’t find the correct answer to my question.

    I need to order my custom post type first by date and then by time.

    Here’s what I tried: http://pastebin.com/BRR6h08j

    It order well by the date but not by the time. And I need to show everypost (even if the date is passed)

    If someone can help me getting my correct meta_keys

    I know the problem is here:

    'meta_query' => array(
         'relation' => 'AND',
          array(
            'key' => 'heure_de_lartiste',
            'value' => $todaysDate,
            'compare' => '>='
           )
      ),

    I don’t know what to put in “value” and “compare”

    Thanks a lot,

    Jhon

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Order by multiple meta keys on wordpress’ is closed to new replies.