我在我的query\\u帖子中有以下查询,希望向其中添加order by。Order by将位于另一个自定义字段上,并按desc Order排序。
这是我现有的查询。
//show all active posts for this taxonomy
query_posts( array(
\'post_type\' => APP_POST_TYPE,
\'post_status\' => \'publish\',
APP_CUSTOM_TAX => $term->slug,
\'ignore_sticky_posts\' => 1,
\'orderby\' => \'date\', //Instead of this, i want to use custom field like \'votes\',\'date\'
\'meta_query\' => array(
\'relation\' => \'OR\',
array(
\'key\' => \'offer_type\',
\'compare\' => \'NOT EXISTS\',
),
array(
\'key\' => \'offer_type\',
\'value\' => \'top\',
\'compare\' => \'!=\',
)
))
);
请提出建议。