0
我想對已經返回的一組帖子運行查詢,我使用$ _GET ['location']從url獲取查詢,現在問題是這個獲得價值可以等於不同meta_values的大量所以我試圖運行下面:在functions.php中的Wordpress查詢
if(isset($_GET['location'])) {
$query->set('relation', 'OR');
$query->set('meta_key', 'location_text');
$query->set('meta_compare','LIKE');
$query->set('meta_value', $_GET['location']);
$query->set('relation', 'OR');
$query->set('meta_key', 'job_description');
$query->set('meta_compare','LIKE');
$query->set('meta_value', $_GET['location']);
$query->set('relation', 'OR');
$query->set('meta_key', 'job_ref');
$query->set('meta_compare','LIKE');
$query->set('meta_value', $_GET['location']);
}
但返回的最後一個查詢執行它只返回最後的查詢,以便job_ref - >是這樣甚至可能嗎?