因此,我成功地根据城市和州对我的自定义帖子类型“property”进行了排序,使用以下方法:
<?php
$querystr = "
SELECT wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta, $wpdb->postmeta wpostmeta2
WHERE wposts.ID = wpostmeta.post_id
AND wposts.ID = wpostmeta2.post_id
AND wpostmeta.meta_key = \'state\'
AND wpostmeta2.meta_key = \'city\'
AND wposts.post_type = \'property\'
AND wposts.post_status = \'publish\'
ORDER BY wpostmeta.meta_value ASC, wpostmeta2.meta_value ASC
";$pageposts = $wpdb->get_results($querystr, OBJECT);?>
现在,我想添加第三个分类器,它只是文章标题(属性名称)。如何将此添加到?将帖子标题标识为查询字符串的一部分的正确名称是什么?