Support

Account

Home Forums General Issues need to select first item in meta_value array to sortby Reply To: need to select first item in meta_value array to sortby

  • Hi @crushdg

    If you review the ‘orderby’ documentation on:
    http://codex.wordpress.org/Class_Reference/WP_Query

    You will see that the ‘orderby’ => ‘meta_value’ param will then tell WP to order the posts by the field name in the param ‘ ‘meta_key’ => ‘application_type’

    So your code above looks like it will order the posts by ‘application_type’ value.
    I don’t understand what you mean by:
    Currently the orderby ‘meta_value’ is an array

    In the above code, orderby is not an array. It is a string with a value of ‘meta_value’

    Thanks
    E