WordPress autocomplete search with taxonomies
Ok I got it! That’s the code for my search-results.php <?php include(‘../../../wp-load.php’); $term=$_GET[“term”]; $json=array(); $terms = get_terms( ‘produits’ ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ foreach ( $terms as $term ) { $json[]=array( ‘value’=> $term->name ); } } echo json_encode($json); ?> Thanks milo for your help ! I needed … Read more