2010-11-11から1日間の記事一覧

WordPressでの検索における記事タイプの指定

WordPressでカテゴリ指定(cat=N)の検索をしても、記事、ページ両方検索してしまうようだ。 wp-includes/query.php の get_posts() 部分に、 if ( !isset($q['post_type']) ) { if ( $this->is_search ) $q['post_type'] = 'any'; else $q['post_type'] = '';…