Title: Advanced Custom Routes &#8211; Custom Endpoints for WP REST API
Author: Logan Carlile
Published: <strong>27 juillet 2019</strong>
Last modified: 28 juillet 2019

---

Recherche d’extensions

![](https://ps.w.org/advanced-custom-routes-custom-endpoints-for-wp-rest-api/assets/
banner-772x250.png?rev=2129545)

Cette extension **n’a pas été testée avec plus de trois mises à jour majeures de
WordPress**. Elle peut ne plus être maintenue ou supportée et peut avoir des problèmes
de compatibilité lorsqu’elle est utilisée avec des versions de WordPress plus récentes.

![](https://ps.w.org/advanced-custom-routes-custom-endpoints-for-wp-rest-api/assets/
icon-256x256.png?rev=2129545)

# Advanced Custom Routes – Custom Endpoints for WP REST API

 Par [Logan Carlile](https://profiles.wordpress.org/lcarlile/)

[Télécharger](https://downloads.wordpress.org/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api.0.8.0.zip)

 * [Détails](https://fr.wordpress.org/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/#description)
 * [Avis](https://fr.wordpress.org/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/#reviews)
 * [Développement](https://fr.wordpress.org/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/#developers)

 [Support](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/)

## Description

The REST API was a great additional to WordPress that made it easy to grab data 
through the default routes. The biggest issue with these default routes is it will
either grab too much data or too little data and it didn’t make it easy to only 
grab the data you need. This plugin makes it possible to create custom routes where
you can set to pull only the data you need/want. Even better you won’t even have
to touch a line of code to make it work, everything will be configurable within 
the WordPress dashboard.

### Features ⚡️

 * Unlimited custom routes
 * Custom route naming
 * Custom filtering to only receive data you need
 * Select which fields to output
 * Query parameters
 * A hassle-free experience

### How to use

 1. To start using **Advanced Custom Routes**, go to the WordPress dashboard and select
    the **Custom Routes** section.
 2. Next click ‘Add New’ to create your first custom route.
 3. Give your custom route a name and start configuring your custom route to what you
    need.
 4. **Query Builder Options:** Select how to filter the posts you would like to receive
    at this custom route.
 5. **Response Output:** Select which fields you would like to receive at this custom
    route.
 6. Once you have configured everything to your liking, publish the custom route and
    you will now be able to receive your selected data at this route.

### Query Builder Options

 * Posts, Pages, and Custom Post Types
 * Post ID
 * Categories
 * Tags
 * Author
 * Post Parent
 * Status
 * Order & Orderby
 * Date
 * Amount & Offset

### Response Output

 * ID
 * Title
 * Content
 * Excerpt
 * Link
 * Slug
 * Date Posted
 * Status
 * Featured Image
 * Categories
 * Tags
 * Author
 * Post Type
 * Template
 * Post Parent
 * Menu Order
 * Custom Fields

### Route Parameters

You can also filter your custom routes using query parameters that you add to the
end of your custom route like so:

    ```
    https://example.com/wp-json/custom-routes/v1/posts?id=1
    ```

In the example above it would only pull data for that custom route where the post’s
ID was equal to 1. This can be used for multiple different query parameters:

 * amount
 * offset
 * page
 * post_type
 * id
 * id_exclude
 * category
 * category_exclude
 * tag
 * tag_exclude
 * author
 * author_exclude
 * post_parent
 * post_parent_exclude
 * status
 * date_before
 * date_after
 * order
 * orderby
 * slug
 * search
 * page

### Single Post Route

You can also receive data for a single post at a custom route using either an ID
or a Slug, like so:

### ID:

    ```
    https://example.com/wp-json/custom-routes/v1/posts/1
    ```

(This would grab the post with an ID of 1 at this custom route)

### Slug:

    ```
    https://example.com/wp-json/custom-routes/v1/posts/hello-world
    ```

(This would grab the post with the slug of _hello-world_ at this custom route)

### How to install Advanced Custom Routes.

### Using WordPress Plugin Directory

Navigate to the ‘Add New’ in the plugins dashboard
 Search for ‘Advanced Custom 
Routes’ Click ‘Install Now’ Activate the plugin on the Plugin dashboard

### Uploading it to WordPress

Navigate to the ‘Add New’ in the plugins dashboard
 Navigate to the ‘Upload’ area
Select advanced-custom-routes.zip from your computer Click ‘Install Now’ Activate
the plugin in the Plugin dashboard

### Via FTP

Download advanced-custom-routes.zip
 Extract the advanced-custom-routes directory
to your computer Upload the advanced-custom-routes directory to the /wp-content/
plugins/ directory Activate the plugin in the Plugin dashboard

## Captures d’écrans

[⌊Advanced Custom Routes - List View⌉⌊Advanced Custom Routes - List View⌉[

Advanced Custom Routes – List View

[⌊Advanced Custom Routes - Query Builder Options⌉⌊Advanced Custom Routes - Query
Builder Options⌉[

Advanced Custom Routes – Query Builder Options

[⌊Advanced Custom Routes - Response Output⌉⌊Advanced Custom Routes - Response Output⌉[

Advanced Custom Routes – Response Output

[⌊Advanced Custom Routes - Settings⌉⌊Advanced Custom Routes - Settings⌉[

Advanced Custom Routes – Settings

## FAQ

  Why isn’t my custom post type showing in the query builder options?

Make sure when creating a custom post type that it is allowed to show in the REST
API by setting `show_in_rest` to `true`.

 Why is my custom route appearing empty?

If you custom route is appearing empty that means it cannot find any posts that 
match your query builder options. I would go back and make sure they are set up 
correctly.

 Can I use pagination with my custom route?

Sure can! To use pagination use the `page` route parameter.

 How do I receive a single post from my custom route?

To receive a single post from a custom route add the post’s ID or slug to the end
of the custom route. Learn more above in the _Single Post Route_ section.

 My custom fields are not outputting how I expect at my custom route?

Make sure to go to _Settings_ in Custom Routes to set your preferred custom fields
plugin/library.

## Avis

![](https://secure.gravatar.com/avatar/7161b67314817eda115456432f4f880f315e5fe4a77e4b36c7e2b722b86be8ab?
s=60&d=retro&r=g)

### 󠀁[Amazing plugin](https://wordpress.org/support/topic/amazing-plugin-1772/)󠁿

 [gustavovida](https://profiles.wordpress.org/gustavovida/) 12 février 2021

This plugin is amazing. I don't understand how it has so few installations so far.
It has saved me hours and hours of work. It works great!

![](https://secure.gravatar.com/avatar/6993e0c3fe1363d316242d3b9c684423e832a62eadbdaf6af1fa3673a58c465f?
s=60&d=retro&r=g)

### 󠀁[Amazing !](https://wordpress.org/support/topic/amazing-2474/)󠁿

 [Anonymous User 15640583](https://profiles.wordpress.org/anonymized-15640583/) 
18 janvier 2020

This plugin is wonderful. So much customization I love it. And it doesn't slow down
the website. Thanks a lot !

 [ Lire les 2 avis ](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/)

## Contributeurs/contributrices & développeurs/développeuses

« Advanced Custom Routes – Custom Endpoints for WP REST API » est un logiciel libre.
Les personnes suivantes ont contribué à cette extension.

Contributeurs

 *   [ Logan Carlile ](https://profiles.wordpress.org/lcarlile/)

[Traduisez « Advanced Custom Routes – Custom Endpoints for WP REST API » dans votre langue.](https://translate.wordpress.org/projects/wp-plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api)

### Le développement vous intéresse ?

[Parcourir le code](https://plugins.trac.wordpress.org/browser/advanced-custom-routes-custom-endpoints-for-wp-rest-api/),
consulter le [SVN dépôt](https://plugins.svn.wordpress.org/advanced-custom-routes-custom-endpoints-for-wp-rest-api/),
ou s’inscrire au [journal de développement](https://plugins.trac.wordpress.org/log/advanced-custom-routes-custom-endpoints-for-wp-rest-api/)
par [RSS](https://plugins.trac.wordpress.org/log/advanced-custom-routes-custom-endpoints-for-wp-rest-api/?limit=100&mode=stop_on_copy&format=rss).

## Méta

 *  Version **0.8.0**
 *  Dernière mise à jour **il y a 7 ans**
 *  Installations actives **30+**
 *  Version de WordPress ** 4.0 ou plus **
 *  Testé jusqu’à **5.2.29**
 *  Langue
 * [English (US)](https://wordpress.org/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/)
 * Étiquettes
 * [api](https://fr.wordpress.org/plugins/tags/api/)[custom endpoint](https://fr.wordpress.org/plugins/tags/custom-endpoint/)
   [rest](https://fr.wordpress.org/plugins/tags/rest/)[rest-api](https://fr.wordpress.org/plugins/tags/rest-api/)
 *  [Vue avancée](https://fr.wordpress.org/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/advanced/)

## Évaluations

 5 sur 5 étoiles.

 *  [  2 avis à 5 étoiles     ](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/?filter=5)
 *  [  0 avis à 4 étoile     ](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/?filter=4)
 *  [  0 avis à 3 étoile     ](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/?filter=3)
 *  [  0 avis à 2 étoile     ](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/?filter=2)
 *  [  0 avis à 1 étoile     ](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/?filter=1)

[Votre avis](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/#new-post)

[Tout voir](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/reviews/)

## Contributeurs

 *   [ Logan Carlile ](https://profiles.wordpress.org/lcarlile/)

## Support

Quelque chose à dire ? Besoin d’aide ?

 [Voir le forum de support](https://wordpress.org/support/plugin/advanced-custom-routes-custom-endpoints-for-wp-rest-api/)

## Faire un don

Souhaitez-vous soutenir l’avancement de cette extension ?

 [ Faire un don à cette extension ](https://carlile.design/)