Title: Rest api error on calling taxonomy
Last modified: September 11, 2020

---

# Rest api error on calling taxonomy

 *  [matteocinti90](https://wordpress.org/support/users/matteocinti90/)
 * (@matteocinti90)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/rest-api-error-on-calling-taxonomy/)
 * Hi all I have been impletmenting taxonomies to users called ‘profession’ and 
   then they assign themselves different cathegories.
 * For a while the template for the taxonomy worked, now no more..
 * Upon open the page for specific taxonomy ‘profession/artist/’, now i receive 
   this error:
 * Uncaught Error: Call to undefined method stdClass::get_rest_controller()
    in …/
   wp-includes/rest-api.php on line 2209
 * Call stack:
 *  rest_get_route_for_term()
    wp-includes/rest-api.php:2245 rest_get_queried_resource_route()
   wp-includes/rest-api.php:943 rest_output_link_header() wp-includes/class-wp-hook.
   php:285 WP_Hook::apply_filters() wp-includes/class-wp-hook.php:311 WP_Hook::do_action()
   wp-includes/plugin.php:478 do_action() wp-includes/template-loader.php:13 require_once()
   wp-blog-header.php:19 require() index.php:17
 * And this is how I registered the taxonomy:
 *     ```
       register_taxonomy('profession', 'user', array(
         'public'        =>true,
         'single_value' => false,
         'show_admin_column' => true,
         'labels'        =>array(
             'name'                      =>'Professions',
             'singular_name'             =>'Profession',
             'menu_name'                 =>'Professions',
             'search_items'              =>'Search Professions',
             'popular_items'             =>'Popular Professions',
             'all_items'                 =>'All Professions',
             'edit_item'                 =>'Edit Profession',
             'update_item'               =>'Update Profession',
             'add_new_item'              =>'Add New Profession',
             'new_item_name'             =>'New Profession Name',
             'separate_items_with_commas'=>'Separate professions with commas',
             'add_or_remove_items'       =>'Add or remove professions',
             'choose_from_most_used'     =>'Choose from the most popular professions',
         ),
         'query_var' => true,
         'rewrite'       =>array(
             'with_front'                =>true,
             'slug'                      =>'profession',
         ),
         'capabilities'  => array(
             'manage_terms'              =>'edit_users',
             'edit_terms'                =>'edit_users',
             'delete_terms'              =>'edit_users',
             'assign_terms'              =>'read',
         ),
       ));
       ```
   
 * also I am using the lh-user-taxonomy plugin that helps me better save the taxonomy
   to the user I had problems updating before.
 * I am working on a local installation I don’t know if that influences.
 * Thank you.

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/rest-api-error-on-calling-taxonomy/#post-13395396)
 * WP is becoming more and more dependent upon the API. For your taxonomy to be 
   available to the API, include the `'show_in_rest'=> true,` arg when you register.

Viewing 1 replies (of 1 total)

The topic ‘Rest api error on calling taxonomy’ is closed to new replies.

## Tags

 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)
 * [taxonomy template](https://wordpress.org/support/topic-tag/taxonomy-template/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/rest-api-error-on-calling-taxonomy/#post-13395396)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
