Title: Option for activating REST-API
Last modified: January 9, 2018

---

# Option for activating REST-API

 *  Resolved [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * (@volkmar-kantor)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/option-for-activating-rest-api/)
 * Hi there,
    i peak into the code of your plugin and found there is no possibility
   to enable the REST-API for the custom-post-types and taxonomies.
 * It would be great to have this as backend-option, or at least an hook/filter 
   for it.
 * Here is how to add REST-Functionality:
    [https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/](https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/option-for-activating-rest-api/#post-9859462)
 * Hi,
 * At the moment you’d need to follow the instructions for “Adding REST API Support
   To Existing Content Types” on the page you linked to.
 *  Thread Starter [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * (@volkmar-kantor)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/option-for-activating-rest-api/#post-9865029)
 * Hi,
    i am sorry. Didn’t see this code.
 * The following code worked perfect (PHP7):
 *     ```
       add_action( 'init', function() {
       	global $wp_post_types;
   
       	$post_type_name = 'event';
       	if( isset( $wp_post_types[ $post_type_name ] ) ) {
       		$wp_post_types[$post_type_name]->show_in_rest = true;
       	}
       },25);
       ```
   
    -  This reply was modified 8 years, 5 months ago by [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/).
      Reason: code-tag incorrect

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Option for activating REST-API’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Volkmar Kantor](https://wordpress.org/support/users/volkmar-kantor/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/option-for-activating-rest-api/#post-9865029)
 * Status: resolved