Kava  |  Multipurpose WP Theme with Elementor Page Builder

My cart

Type de publication personnalisé dans la recherche par défaut

function my_search_filter($query) {
  if ( !is_admin() && $query->is_main_query() ) {
    if ($query->is_search) {
      $query->set('post_type', array( 'news','post','article' ) );
    }
  }
}
add_action('pre_get_posts','my_search_filter');
Scroll to Top
Skip to content