updating search to find fiches infos & brochures
This commit is contained in:
parent
c3650314a6
commit
30bd2e2344
|
|
@ -3,7 +3,7 @@
|
|||
function tg_include_custom_post_types_in_search_results($query)
|
||||
{
|
||||
if ($query->is_main_query() && $query->is_search() && !is_admin()) {
|
||||
$query->set('post_type', array('questions', 'conseils', 'page', 'news', 'jobs'));
|
||||
$query->set('post_type', array('post', 'brochures', 'questions', 'conseils', 'page', 'news', 'jobs', 'fiches-infos'));
|
||||
}
|
||||
}
|
||||
add_action('pre_get_posts', 'tg_include_custom_post_types_in_search_results');
|
||||
|
|
|
|||
|
|
@ -109,6 +109,12 @@ function show_post_type_label_name($post_type)
|
|||
case 'jobs':
|
||||
return __("Offre d'emploi", "homegrade-theme__texte-backoffice");
|
||||
|
||||
case 'brochures':
|
||||
return __("Brochures", "homegrade-theme__texte-backoffice");
|
||||
|
||||
case 'fiches-infos':
|
||||
return __("Fiche info", "homegrade-theme__texte-backoffice");
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user