WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Mickey Kay v1.1.0

REST API Enabler

Enable the WP REST API to work with custom post types, custom fields, and custom endpoints.

REST API Enabler

The facts

Rating
5★ from 3
Active installs
200+
Price
Free
Last updated
4 Jul 2016
Added
Oct 2015
Requires WP
3.5
Tested up to
WP 4.4.34
Downloads
11,044

Our analysis

AI-assisted

REST API Enabler is a WordPress plugin that allows you to make custom post types and custom fields accessible via the WordPress REST API. After activation, you can enable or disable specific post types and customize their endpoints through the plugin's settings in the admin area.

This plugin is suitable for developers or site owners who need to expose custom post types and fields in their REST API responses, facilitating integration with other applications or services that rely on this data format.

Best for: This plugin is best for developers needing to work with custom post types and fields in the WordPress REST API.

What it does well

  • Enables custom post types in the WordPress REST API
  • Allows selection of custom fields for API responses
  • Includes custom field data under a specific key in responses
  • User-friendly settings in the admin area

Where it falls short

  • Limited information available about additional features
  • Last updated in July 2016, may not be compatible with newer WordPress versions

Verdict

REST API Enabler provides a straightforward solution for exposing custom data through the REST API, but its age may affect compatibility with newer WordPress releases.

From the developer

Mickey Kay's own description of REST API Enabler, lightly tidied.

Like this plugin? Please consider leaving a 5-star review.

By default, custom post types and custom fields are not accessible via the WordPress REST API. REST API Enabler allows you to:

  1. Enable the WP REST API for custom post types and specify WP REST API custom endpoints.
  2. Choose which custom fields to include in WP REST API responses for posts, pages, and custom post types.

All enabled custom field data is included in the REST API response, nested under the rest_api_enabler key, like so:

[
  {
    "id": 179,
    "date": "2016-07-03T18:06:50",
    "title": {
      "rendered": "Test Job"
    },
    .
    .
    .
    "rest_api_enabler": {
      "custom_meta_1": "Value 1",
      "custom_meta_2": "Value 2",
      "custom_meta_3": [
        "Array value 1",
        "Array value 2"
      ]
    }
  }
]

Note: prior to verion 1.1.0, all meta keys were included as top-level keys in the API response. Additionally, all values were returned as arrays, regardless of whether the original value was actually an array. This functionality is now deprecated as it risks key-name collisions. Please reference the rest_api_enabler top-level key instead.

Usage

  1. Activate the plugin, then go to Settings → REST API Enabler in the admin.
  2. Click the Post Types tab to enable/disable post types and customize their endpoints.
  3. Click the Post Meta tab to enable/disable post meta (custom fields).

NOTE: by default, the plugin does not display settings for protected post meta (post meta that begins with an underscore and is intended for internal use only). If you wish to include protected post meta in the plugin settings, you can use the rae_include_protected_meta filter to do so. The following code can be placed in your theme’s functions.php file, or in a custom plugin (on init priority 10 or earlier):

add_filter( 'rae_include_protected_meta', '__return_true' );

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for custom content structures.

Ad Inserter

Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...

Free 300k+ installs 4.9★ (2,428)
Advanced Custom Fields

ACF helps customize WordPress with powerful, professional and intuitive fields. Proudly powering over 2 millio...

Free 2M+ installs 4.5★ (1,438)
Simple Custom Post Order

Easily reorder posts, pages, custom post types, and taxonomies with intuitive drag-and-drop sorting in the Wor...

Free 300k+ installs 4.8★ (569)
WP Activity Log

The #1 user-rated activity log plugin for event logging, activity monitoring and change tracking.

Free 300k+ installs 4.7★ (488)
Custom Post Type UI

Admin UI for creating custom content types like post types and taxonomies

Free 1M+ installs 4.6★ (276)