MB REST API is a free extension for the Meta Box plugin which pulls all custom fields' values (meta value) from posts, pages, custom post types, terms into the WordPress REST API responses under meta_box key.

The extension is very helpful when you build apps, themes for WordPress using REST API, which allows you to access more data for posts and terms. By default, WordPress doesn't return such data.

Custom fields in REST API responses
Custom fields in REST API responses

The extension works with both posts (including pages and custom post types), terms (requires and is compatible with the MB Term Meta extension) and users (requires MB User Meta).

All the meta data is automatically pulled and put in a meta_box key in the response from the Rest API. There's nothing to configure or code. Just install and use it.

Install

The extension is available on WordPress.org, you can search and install it from the admin area:

  • Go to Plugins | Add New and search for MB REST API
  • Click Install Now button to install the plugin
  • After installing, click Activate Plugin to activate the plugin

Don't forget to install Meta Box and WP Rest API plugins.

See how the plugin works

View plugin on wordpress.org | View plugin on Github