我正在从数据库中提取目的地并尝试按以下方式按字母顺序排序:
row.tds[0].text
但没有成功。为什么?
答案 0 :(得分:1)
$destinations = get_posts( array(
'post_type' => 'destination_showcase',
'posts_per_page' => -1,
'post_status' => 'publish',
'orderby' => 'title',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'destination_state',
'value' => ':"'.$state_id . '";' , // looking for serialized value in quotes
'compare' => 'LIKE'
)
),
) );
尝试订单更改