2
WordPress的3.5.2。 舊建築像多標籤搜索WordPress的
?tag=tag1+tag2
不能再工作。我不知道爲什麼。 我有一個帶複選框的表單。和按類別排序的標籤。 所以,我想通過
tag1+tag2+tag3
在特定的類別進行搜索。 如何做到這一點? 我一個解決方案:(
WordPress的3.5.2。 舊建築像多標籤搜索WordPress的
?tag=tag1+tag2
不能再工作。我不知道爲什麼。 我有一個帶複選框的表單。和按類別排序的標籤。 所以,我想通過
tag1+tag2+tag3
在特定的類別進行搜索。 如何做到這一點? 我一個解決方案:(
逗號分隔他們疲憊的神情:
/** posts with any of the following tags */
$query = new WP_Query('tag=bread,baking');
/** posts with all of the following tags */
$query = new WP_Query('tag=bread+baking+recipe');
/** or alternatively */
$query = new WP_Query(array('tag_slug__in' => array('bread', 'baking')));
都能跟得上需要這個插件的工作http://wordpress.org/plugins/ TDO標籤 - 修復/ –