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 to use get_terms !
Related Posts:
- WordPress custom taxonomies new/edit post autocomplete
- Using pre_get_posts to rewrite search query to display posts from multiple taxonomies
- Exclude Specific Term from Search
- WordPress database error: [Not unique table/alias: ‘wp_postmeta’]
- WordPress Search – display taxonomy terms in results
- Custom taxonomy only shows 0 in autocomplete for terms and “Choose from the most used tags”
- How to find taxonomy name using only taxonomy TERM ID (or taxonomy term name)
- Sort posts by number of matched terms
- How to add custom taxonomy to search
- Taxonomy.php issue with search and filters
- Extending wordpress search to include excerpts and taxonomies?
- How to filter WordPress search, excluding post in some custom taxonomies?
- how to search in custom fields & custom taxonomy for custom search
- Search by type posts and taxonomy
- How to add autocomplete to custom taxonomy for CPT
- Autogenerate Front End Form Field With jQuery
- Creating a custom search form
- How to implement custom search with input fields?
- How do I keep the page I’m on within the URL when running a search on a taxonomy?
- Add multiple taxonomy filters to edit.php that support search
- Extend & Search Native WordPress Image Galleries With Tags and Taxonomies?
- Custom Taxonomy Not Working When added to WordPress Search
- Search Tool only refreshes Page without showing results
- WordPress thinks my custom taxonomy pages are search pages #seo
- Removing “s” from search with custom parameters
- Passing form inputs into multi-taxonomy query
- Custom URLs in Custom Search Results
- Search Query for Multiple Terms In Same Taxonomy
- Use an HTML Element To Filter Taxonomies In WP Search
- Why isn’t the ‘no results’ being shown when a query returns no results?
- Clean Custom URL for Serach + Custom Taxonomy
- Advanced search redirecting to another page then filter further
- Search only custom taxonomies
- How do I make multiple dependent input fields that use the jquery autocomplete function?
- Geographic search with taxonomy structure [duplicate]
- search using multiple taxonomies and keyword
- Taxonomy or Custom Field
- Multiple Drop-Down custom taxonomies search
- Filter with two id of the same value CPT UI(taxanomies)
- Amend taxonomy to search in wordpress admin
- Include get_term_link inside search
- Product custom taxonomy is not found when space in name
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- Search custom taxonomy via query-string?
- How to exclude woocommerece product category in search results?
- Post not showing in my custom advanced search
- Include attachments with a custom taxonomy in search
- Custom taxonomy displayed in search results
- How to perform a search inside a specific taxonomy category
- Custom taxonomy auto suggest not working in wordpress admin
- Custom Taxonomy, shows empty value (home page of website)
- Advanced WordPress search form based on custom taxonomy and custom meta value
- Custom Search only for my Custom Taxonomy Page – data
- Search and filter with custom field in taxonomy
- get_terms does not return any results for my custom taxonomy?
- Order terms by term_order
- How do you remove a Category-style (hierarchical) taxonomy metabox?
- You are not allowed to manage these items – bug introduced in 4.4
- Get taxonomy name of current post
- How to hide custom taxonomy archives same way as hiding custom post types?
- Remove Custom Taxonomy Base
- Retrieve custom taxonomies
- why do drafts return as part of wp_query?
- Taxonomy archive template to have conditional logic for displaying child categories
- Set posts_per_page in WP_Query for custom taxonomy
- How can I allow a custom taxonomy for certain roles?
- Sorting taxonomy columns by meta value numeric
- Custom taxonomy query not working with switch_to_blog
- How can I check if a taxonomy has more than one item?
- How to check if do_shortcode will be execute directly in a template php file
- I used the Tax-meta-class by bainternet but i still can’t get it to display any of the results.
- search also in taxonomy, tags and custom fields
- Show only the grandchildren (using get_terms)
- Replace taxonomy permalinks
- How to rename custom taxonomy URL with extra words
- Separate tags with semicolon
- What is the action hook that deletes a taxonomy term from the backend? And how to retireve the term id before deleting it?
- How can I get a paginated list of custom taxonomy tags with posts?
- Create alphabetical Pagination for custom taxonomy?
- Save values generated via API as taxonomy terms
- URL rewriting taxonomy term
- Taxonomy archive template that shows posts from more than one taxonomy
- Hide echo of no categories from get_object_taxonomies
- Drop-down filter doesn’t retrieve custom taxonomies
- How Can I Remove Child Slug From Grandchild Slug When Using Duplicate Grandchild Slugs?
- How to filter and/or sort user taxonomy query inside custom user taxonomy archive page?
- Create multiple taxonomies with custom fields values on the fly when creating new posts
- Custom Taxonomies Archive Page 404
- Add custom taxonomy for post using cron job
- Custom column into custom taxonomy (img tag with slug-name as file name)
- ACF Custom field not showing in Timber Taxonomy page
- Displaying subcategories and then posts in taxonomy template
- How to show one post content in another post content which has same terms?
- How to set “manage categories” capabilities on a post type taxonomy but not on the general categories?
- List terms and order by second word
- add custom fields in custom taxonomy meta box in wordpress-3.5.2
- How to update WordPress custom SQL Select query for custom taxonomies so that syntax is correct?
- Display term description on hover using get_the_term_list
- Display woocommerce product_cat child terms with thumbnails
- How to add a custom page template selector to a custom taxonomy?