Support » Plugin: Custom Post Type UI » Is there any CPTUI’s own rest-API? (i.e: create CPT through api)

  • Resolved mfyz

    (@mfyz)


    I am trying to find CPTUI’s own rest api if there is any. Couldn’t find anything or anyone asking about this.

    I want to be able to create post types (maybe update them as well) using CPTUI through wp-api (or CPTUI’s own rest api). Most my team members will still use the UI, but I want to automate initial wordpress set up and some of the CPT registration through the api without code change. CPTUI has been great on the UI but it would be amazing if there was an api to perform at least basic operations.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    hi @mfyz,

    We don’t have any functionality like that. It also admittedly sounds like a really fun idea to try and get implemented, but at the same time there isn’t a lot of demand for this either, so I don’t know how much it’d be worth in the long run. The closest we have is some basic import/export functionality for WP-CLI but that’s also not quite what you’re looking for.

    We store everything as a pair of associative arrays in the options table, so in theory it wouldn’t be that difficult to fetch, manipulate, and then update those arrays.

    Thread Starter mfyz

    (@mfyz)

    For the time being, I created a generator (I’ll publish open source – public soon), that generates CPTUI import json from a super simple yml format.

    So I construct my custom post type (and ACF fields) model in a quick yml that the script spits out the json that can be copy/pasted and imported to CPTUI import tool. Haven’t fully tested yet, but that’s the track I went with for now. It still saves me manually creating 10 CPTs with simple text editing and few clicks.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Whatever works and gets the job done, right?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is there any CPTUI’s own rest-API? (i.e: create CPT through api)’ is closed to new replies.