你好,这是我的问题。我想显示标题的职位,有fullfil以下,但它没有显示任何东西,我不知道。非常感谢。还有,有没有其他方式来显示结果,更像wordpress?
<?php
$theposts = $wpdb->get_results("SELECT post_title FROM $wpdb->posts
WHERE ID IN
(
SELECT DISTINCT post_id
FROM $wpdb->postmeta
WHERE meta_key = \'extra1\' AND meta_value = \'test\'
)");
foreach ($theposts as $thepost) {
echo $thepost->post_title;
}
?>