WordPress.org

Ready to get started?Download WordPress

Forums

Order by multiple meta keys on wordpress (2 posts)

  1. jhonb
    Member
    Posted 5 months ago #

    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

  2. jhonb
    Member
    Posted 4 months ago #

    Can't find the answer, nobody can help?

    Thanks a lot!

Reply

You must log in to post.

About this Topic