how to get custom terms & taxonomies
-
I need to get the list of data’s with taxonomy term property_category,based on this property_category having data’s like apartment,house,office etc.For example localhost url given but getting 403 error permission denied.
https://192.168.0.101:8383/wp-json/wp/v2/taxonomies/property_category
And also need to get the list of data’s with taxonomy term property_type_category,based on this property_type_category having data’s like rent,sale.
https://192.168.0.101:8383/wp-json/wp/v2/taxonomies/property_type_category
And also one more question while filtering the data’s with custom meta data’s also not working.And i’ve added this custom code for filtering the data’s.For example
custom function
add_filter('rest_query_vars', 'wp_rest_query_vars'); function wp_rest_query_vars($query_vars) { $query_vars = array_merge( $query_vars, array('meta_key', 'meta_value', 'meta_compare') ); return $query_vars; }
Filter query
https://192.168.0.101:8383/wp-json/wp/v2/properties?filter[meta_key]=property_bedrooms&filter[meta_value]=4&filter[meta_compare]=>=&filter[meta_key]=property_bathrooms&filter[meta_value]=4&filter[meta_compare]=>=
- The topic ‘how to get custom terms & taxonomies’ is closed to new replies.