WP Insert Post Element

Inserts or updates a WP post.

When to use?

When you want to insert an post in WordPress from your Skill.

How to use:

  1. Enter a Name for your recently created post.
  2. Type false in Fire After Hooks if you don't want to fire the after insert hooks.
  3. Fill out WP Post args which are described here, except tax_input and meta_input. The following params: meta_input and meta_input are handled in WP Post tax input and WP Post meta input
  4. If you want to update an post, add the ID to WP Post args. More info is available here
  5. If you want to add tax_input, fill out WP Post tax input. More info on that is here.
  6. If you want to add meta_input, fill out WP Post meta input.

After the element was executed, you'll get either WP_Post or WP_Error object as result of wp_insert_post( array $postarr, bool $wp_error = false, bool $fire_after_hooks = true )

On Success

Elements in On Success will be executed in case the post was inserted successfully.

You'll get the recently created WP_Post in form of (${status.post}) object and be able to access its properties like this:

On Failure

Elements in On Failure will be executed, in case the post was not inserted successfully.

You'll get the WP_Error in form of (${status.wp_error}) object and be able to access its properties like this: