カスタム投稿(例:サークルというカスタム投稿とお知らせというカスタム投稿、みたいなね)別に それぞれ検索フォームを設置した際にその検索結果を出すページもそれぞれ準備したいなと思いググったメモ。 function.phpに下記追加 // テンプレート読み込みフィルターをカスタマイズ add_filter('template_include','custom_search_template'); function custom_search_template($template){ // 検索結果の時 if ( is_search() ) { // 表示する投稿タイプを取得 $post_types = get_query_var('post_type'); // search-{$post_type}.php の読み込みルールを追加 foreach ( (array) $post_types