WP-API / docs

The content for developer.wordpress.org/rest-api

Home Page:https://developer.wordpress.org/rest-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add "type" support when creating a new post

jonferreira opened this issue · comments

Hi,

Would be great to add support for posts "type" when creating a post with POST /wp/v2/posts

According to https://developer.wordpress.org/rest-api/reference/posts/#create-a-post "type" is not supported?

Version 2 of the REST API uses separate endpoints for separate post types, rather than a generic "posts" endpoint for all CPTs.

This is pretty well covered at https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/ I think?

Sooooooo easy! - I completely missed that, thanks @rmccue