[Resolved] Create custom post type by code

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Christian Cox 1 year, 5 months ago.

Assigned support staff: Christian Cox.

Author
Posts
#690904

Hi there,

I'd like to do something like this https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/ but only by code, i.e. I want to create a custom post type that is "Toolset-ready" by code.

More practical, I would like to replace this code: `register_post_type(self::POSTTYPE, self::POSTTYPE_ARGS)` by something like this `wp_types_register_post_type(self::POSTTYPE, self::POSTTYPE_ARGS)ยด

In the end I would expect this post type to behave just like one created by the Toolset GUI.

Is there any API for that?

Best regards

#694889

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hi, I'm not aware of a public API for registering post types the Toolset way, but I will reach out to my 2nd tier support team to see if there is any alternative to the GUI.

#710333

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

It turns out there is not a public API for creating custom post types in code. For now, the best approach is to create new post types using the GUI.

The forum ‘Types Community Support’ is closed to new topics and replies.