0

I have a custom meta field that I want to use to sort with query_posts but its not ordering my posts properly since it is a datestamp (i.e. 04/21/2014) and its treating it like a normal text string.

I thought about converting the field using strtotime but that doesn't work.

$args = array( 'meta_key' => strtotime('pexpires'), 'orderby' => 'meta_value', 'order' => 'desc', 'post_type' => 'post', 'showposts' => '60', ); $query = query_posts($args); 
2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.