WP REST API – get custom taxonomies based on terms & filter
Herewith find the below answer for my own question for the custom taxonomies based listing the categories add_action( ‘init’, ‘rest_custom_category_request’, 25); function rest_property_type_category_request(){ global $wp_taxonomies; $wp_taxonomies[‘custom_category’]->show_in_rest = true; $wp_taxonomies[‘custom_category’]->rest_base=”custom_category”; $wp_taxonomies[‘custom_category’]->rest_controller_class=”WP_REST_Terms_Controller”; } Answer for the filter with custom meta key & values add_filter(‘rest_query_vars’, ‘custom_rest_query_vars’); function custom_rest_query_vars($query_vars) { //print_r($query_vars);exit; $query_vars = array_merge( $query_vars, array(‘meta_key’, ‘meta_value’, ‘meta_compare’) ); … Read more