0

wordpress でカスタム分類法を検索するために利用できるプラグイン/ハックがあることを知りたいですか?

あらゆるアイデアの方向性は素晴らしいでしょう。

4

3 に答える 3

1

これはどう?

function search_by_tax_filter(&$query)
{
    if ($query->is_search)
        $query->set('taxonomy', 'taxonomy_name');
}
add_action('parse_query', 'search_by_tax_filter');
于 2010-06-09T15:37:26.393 に答える
0

トリッキーなビジネス...これで始められます。これは上位 5 つのタグ (分類法: post_tag) を照会します...

// query the top five tags
$sql = '
    SELECT wt.term_id ti,wt.name, wtt.count tc,wtr.term_taxonomy_id tti, wtr.object_id oi 
    FROM wp_terms wt 
    INNER JOIN wp_term_taxonomy wtt ON wt.term_id = wtt.term_id 
    INNER JOIN wp_term_relationships wtr ON wtr.term_taxonomy_id = wtt.term_taxonomy_id 
    LEFT JOIN wp_posts wp ON wp.ID = wtr.object_id 
    WHERE taxonomy = \'post_tag\' 
    GROUP BY name 
    ORDER BY count DESC LIMIT 0 , 5 
'; 
于 2010-06-09T07:11:36.690 に答える
0

I've recently developed a plugin that provides custom taxonomy filtering through front-end forms (with dropdowns and an optional text input):

Advanced Custom Post Search

It runs off of its own results page and doesn't directly tie in with the default search.php, nevertheless its still very flexible and allows you to override the plugin pages in your theme.

于 2013-12-21T18:42:49.210 に答える