• I am trying to sort by meta_value, but when the data was entered into WP
    it was done wrong.

    Here goes.
    I have a custom field meta_key = age
    meta_value = 05/06/2000

    I am using $query = $query_string .’&meta_key=age&order=ASC’;
    to pull the data.

    What i need to do is after that query I want to use date(“Y-m-d”,strtotime())
    to reformat the date to look like 2000-05-06.
    Once that is done I then need to sort the post by that meta_value. ASC

    So right now i can pull that data but am stuck on what to do after the $query.

    Thanks for the help.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change meta_value after query’ is closed to new replies.