Question

How do I automate create a new wordpress post that’s a custom post type?

  • 31 January 2024
  • 5 replies
  • 143 views

I’m trying to create a directory of businesses that opt into being added to it during a form submission. The directory is made up of photographers (the custom post type) and grabs their contact info from the form.

I’m looking for a way to automate adding them to the directory as I could at any moment get an influx of 100 -150 in one day.

There was a similar question, but it was over a year old. And if zapper doesn’t support this directly, can someone point me to a way I can intercept the zap function on the Wordpress end and redirect it to the correct post type?


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +14

Hi @EnloeStudio 

If the Post Type is not available in the WordPress Create Post action, then you will have to explore using the WordPress API via one of the advanced actions shown below.

 

###

 

 

The problem is that the post type is available, but none of the data fields are, which causes an error and prevents the zap from working.

I may have to look into the API Request action though. Is there any documentation on how that works?

Userlevel 7
Badge +14

@EnloeStudio 

Did you try clicking the button [Refresh Fields] to see if more fields are exposed after selecting the Post Type?

WordPress API: https://developer.wordpress.org/rest-api/

Have the same issue, yes even when I press Refresh fields, the fields dont show. In my case my custom post type is called Portfolio.

 

No fields seen even after clicking refresh fields
As you can see some fields include, “about-portfolio”, “website-link”...etc
I handle my CPTs on Crocoblock JetEngine and enable Show in Rest API

 

Userlevel 7
Badge +14

Hi @Matteo Grixti 

You may have to explore using the WordPress API via one of these actions...

WordPress API: https://developer.wordpress.org/rest-api/