Plugin info

Total downloads: 11,023
Active installs: 500
Total reviews: 5
Average rating: 5
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 3/1/2016 (3591 days ago)
Added to WordPress: 2/12/2016 (9 years old)
Minimum WordPress version: 4.4
Tested up to WordPress version: 4.4.34
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 3591 days ago • 5 reviews

22/100

Is WP REST API – Pure Taxonomies abandoned?

Possibly abandoned (last update 3591 days ago).

Compatibility

Requires WordPress: 4.4
Tested up to: 4.4.34
Requires PHP: f

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

WP REST API – All Terms
Rating 5.0/5 (3 reviews)Active installs 40
JWT Authentication for WP REST API
Rating 4.4/5 (51 reviews)Active installs 60,000
ACF to REST API
Rating 4.9/5 (34 reviews)Active installs 30,000
REST API Meta Support
Rating 5.0/5 (2 reviews)Active installs 6,000
REST API Log
Rating 3.6/5 (24 reviews)Active installs 5,000
WP API Menus
Rating 5.0/5 (8 reviews)Active installs 2,000

Description

Now you have no need to make additional requests to get taxonomy info (term_id, name, slug, term_group, term_taxonomy_id, taxonomy, description, parent, count, filter) from their id that is available in the default json response.

Now all available taxonomy data is available in ‘pure_taxonomies’ field from your json response. It works for all custom added taxonomies, and for custom post types.

For example in ‘wp-json/wp/v2/posts’ you can find default fields ‘categories’, ‘tags’ and name of custom added taxonomies that contain only its id. With this plugin you can also find new ‘pure_taxonomies’ field that include all available ‘categories’, ‘tags’ and custom taxonomies data.

Before:
{

categories: [
3
],
tags: [
2
],
custom_taxonomy_name: [
1
]

}

After:
{

pure_taxonomies: {
categories: [
{
term_id: 3,
name: “First category”,
slug: “first-category”,
term_group: 0,
term_taxonomy_id: 3,
taxonomy: “category”,
description: “”,
parent: 0,
count: 3,
filter: “raw”,
cat_ID: 3,
category_count: 3,
category_description: “”,
cat_name: “First category”,
category_nicename: “first-category”,
category_parent: 0
}
],
tags: [
{
term_id: 2,
name: “First tag”,
slug: “first-tag”,
term_group: 0,
term_taxonomy_id: 2,
taxonomy: “post_tag”,
description: “”,
parent: 0,
count: 2,
filter: “raw”
}
],
custom_taxonomy_name: [
{
term_id: 1,
name: “Custom Taxonomy Name”,
slug: “custom-taxonomy-name”,
term_group: 0,
term_taxonomy_id: 1,
taxonomy: “custom_taxonomy_name”,
description: “”,
parent: 0,
count: 1,
filter: “raw”
}
]
}

}

Check my other useful rest-api plugins: https://wordpress.org/plugins/tags/andrew-magik-rest-api.

Installation

  1. Double check you have the WordPress REST (v2) API installed and active
  2. Upload the plugin folder to the /wp-content/plugins/ directory, or install the plugin through the WordPress plugins screen directly.
  3. Activate the plugin through the ‘Plugins’ screen in WordPress

Frequently Asked Questions

How to add custom taxonomies into Rest API:

/**
* Add REST API support to an already registered taxonomy.
*/
add_action( ‘init’, ‘my_custom_taxonomy_rest_support’, 25 );
function my_custom_taxonomy_rest_support() {
global $wp_taxonomies;

        //Here should be a list of names of the already created custom taxonomies:
        $taxonomy_names = array(
            'clients',
            'technologies'
        );
        foreach ( $taxonomy_names as $key => $taxonomy_name ) {
            if (isset($wp_taxonomies[$taxonomy_name])) {
                $wp_taxonomies[$taxonomy_name]->show_in_rest = true;
                $wp_taxonomies[$taxonomy_name]->rest_base = $taxonomy_name;
                $wp_taxonomies[$taxonomy_name]->rest_controller_class = 'WP_REST_Terms_Controller';
            }
        }
    }

How to add custom post type into Rest API:

/**
* Add REST API support to an already registered post type.
*/
add_action( ‘init’, ‘my_custom_post_type_rest_support’, 25 );
function my_custom_post_type_rest_support() {
global $wp_post_types;

        //Here should be a name of your already created custom post type:
        $post_type_name = 'portfolio';
        if( isset( $wp_post_types[ $post_type_name ] ) ) {
            $wp_post_types[$post_type_name]->show_in_rest = true;
            $wp_post_types[$post_type_name]->rest_base = $post_type_name;
            $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
        }
    }

Do you have other useful REST-API plugins?

Yes, I have. You can check them by tag: https://wordpress.org/plugins/tags/andrew-magik-rest-api.

Review feed

David Massiani
9/3/2016

Works Perfectly

Good job!
Andrew MAGIK
9/3/2016

Very useful to reduce number of requests

Very useful to reduce number of requests

Screenshots

No screenshots available

Changelog

1.0

  • Initial release!