Ajax搜索,如何将taxemony post_tag添加到数组中?

时间:2014-08-20 20:17:52

标签: php ajax wordpress

我有一个ajax搜索,我输出的结果来自一个名为" portfolio"的自定义帖子类型。我已为此自定义帖子类型注册了post_tag分类,并希望在搜索中包含post_tag。我尝试过taxonomy => ' post_tag',但没有运气。理想情况下,我希望post_tag显示页面标题,而不是类别。这是数组:(完整代码:http://pastebin.com/3BruDsL0

if (!function_exists('sf_ajaxsearch')) {
    function sf_ajaxsearch() {
        $search_term = trim($_POST['s']);
        $search_query_args = array(
            's'                 => $search_term,
            'post_type'         => 'any',
            'portfolio-category'=> 'fullvids,indie,feed',
            'post_status'       => 'publish',
            'suppress_filters'  => false,
            'numberposts'       => -1
        );
    }
}

0 个答案:

没有答案