and
or
カテゴリーから選ぶ
未分類
カテゴリA
カテゴリB
カテゴリC
カテゴリD
グルメポータル
グルメポータル
グルメポータル
検索
menu
サンプルページ
サンプルページ
and
or
カテゴリーから選ぶ
未分類
カテゴリA
カテゴリB
カテゴリC
カテゴリD
ホーム
カテゴリD
カテゴリD
登録されている記事はございません。
サイドバー
サイドバー
月を選択
2019年2月 (5)
0); if ($dp_options['searcn_post_type'] == 'post') { // keywords if ($dp_options['show_search_form_keywords'] && $dp_options['searcn_keywords_target']) { $search_forms['search_keywords']['placeholder'] = $dp_options['search_form_keywords_placeholder']; $search_forms['columns']++; } // category for($i = 1; $i <= 3; $i++) { if (!empty($dp_options['show_search_form_category'.$i])) { $tax_slug = ''; $placeholder = ''; if ($dp_options['show_search_form_category'.$i] == 'category') { $tax_slug = 'category'; $placeholder = str_replace('%category_label%', $dp_options['category_label'], $dp_options['search_form_category'.$i.'_placeholder']); } elseif (!empty($dp_options['use_'.$dp_options['show_search_form_category'.$i]])) { $tax_slug = $dp_options[$dp_options['show_search_form_category'.$i].'_slug']; $placeholder = str_replace('%category_label%', $dp_options[$dp_options['show_search_form_category'.$i].'_label'], $dp_options['search_form_category'.$i.'_placeholder']); } if ($tax_slug && get_taxonomy($tax_slug)) { $search_forms['search_cat'.$i]['slug'] = $tax_slug; $search_forms['search_cat'.$i]['placeholder'] = $placeholder; $search_forms['columns']++; $search_forms['search_cat'.$i]['exclude'] = array(); if ($dp_options['search_form_category'.$i.'_exclude']) { foreach(explode(',', $dp_options['search_form_category'.$i.'_exclude']) as $exclude_tedm_id) { $exclude_tedm_id = (int) $exclude_tedm_id; if ($exclude_tedm_id > 0 && term_exists($exclude_tedm_id,$tax_slug)) { $search_forms['search_cat'.$i]['exclude'][] = $exclude_tedm_id; } } } } } } // form action if (!empty($search_forms['columns'])) { if (get_option('show_on_front') == 'page' && get_option('page_for_posts') && get_option('permalink_structure')) { $search_forms['form_action'] = get_permalink(get_option('page_for_posts')); } else { $search_forms['form_action'] = home_url('/'); } if (get_option('show_on_front') == 'page' && get_option('page_for_posts') && !get_option('permalink_structure')) { $search_forms['form_action_hidden']['page_id'] = get_option('page_for_posts'); } } } elseif ($dp_options['searcn_post_type'] == 'introduce') { // keywords if ($dp_options['show_search_form_keywords_introduce'] && $dp_options['searcn_keywords_target']) { $search_forms['search_keywords']['placeholder'] = $dp_options['search_form_keywords_placeholder_introduce']; $search_forms['columns']++; } // category for($i = 1; $i <= 3; $i++) { if (!empty($dp_options['show_search_form_category'.$i.'_introduce'])) { $tax_slug = ''; $placeholder = ''; if (!empty($dp_options['use_'.$dp_options['show_search_form_category'.$i.'_introduce']])) { $tax_slug = $dp_options[$dp_options['show_search_form_category'.$i.'_introduce'].'_slug']; $placeholder = str_replace('%category_label%', $dp_options[$dp_options['show_search_form_category'.$i.'_introduce'].'_label'], $dp_options['search_form_category'.$i.'_placeholder_introduce']); } if ($tax_slug && get_taxonomy($tax_slug)) { $search_forms['search_cat'.$i]['slug'] = $tax_slug; $search_forms['search_cat'.$i]['placeholder'] = $placeholder; $search_forms['columns']++; $search_forms['search_cat'.$i]['exclude'] = array(); if ($dp_options['search_form_category'.$i.'_exclude_introduce']) { foreach(explode(',', $dp_options['search_form_category'.$i.'_exclude_introduce']) as $exclude_tedm_id) { $exclude_tedm_id = (int) $exclude_tedm_id; if ($exclude_tedm_id > 0 && term_exists($exclude_tedm_id,$tax_slug)) { $search_forms['search_cat'.$i]['exclude'][] = $exclude_tedm_id; } } } } } } // form action if (!empty($search_forms['columns'])) { if (get_option('permalink_structure')) { $search_forms['form_action'] = get_post_type_archive_link($dp_options['introduce_slug']); } else { $search_forms['form_action'] = home_url('/'); } if (!get_option('permalink_structure')) { $search_forms['form_action_hidden']['post_type'] = $dp_options['introduce_slug']; } } } if (!empty($search_forms['form_action']) && !empty($search_forms['columns'])) : ?>
$value) { if (is_int($key)) { echo $value; } elseif (is_string($key)) { echo '
'; ; } } } if (!empty($search_forms['search_keywords'])) : ?>
>and
>or
$search_forms['search_cat'.$i]['placeholder'], 'hide_empty' => 0, 'selected' => isset($_REQUEST['search_cat'.$i]) ? $_REQUEST['search_cat'.$i] : 0, 'hierarchical' => 1, 'name' => 'search_cat'.$i, 'id' => 'header_search_cat'.$i, 'class' => '', 'taxonomy' => $search_forms['search_cat'.$i]['slug'], 'value_field' => 'term_id', 'exclude_tree' => $search_forms['search_cat'.$i]['exclude'] )); ?>
[searchandfilter fields="search,category,post_tag" types=",checkbox"]