2

I'm trying to create a form with gravity forms. I need to merge two fields to one Excerpt. I can't give the Excerpt field a merge tag. So I'm trying to use an custom field.

My question is now: what is the WP Parameter to map the Excerpt to the post.

I've tried: the_ excerpt, _excerpt, post_excerpt, etc.

But it never appears in the Excerptfield...

  • $post->post_excerpt = 'This is the Excerpt doesn't work? I imagine you would first need to get the post object, then set the field manually. – Howdy_McGee Mar 20 '14 at 14:10
1

I haven't tried the Gravity Forms plugin but if you are using the wp_insert_post function to insert the new post, you just use 'post_excerpt'.

example:

$new_post = array(
  'post_title'    => 'Post Title',
  'post_content'  => 'Post Content',
  'post_status'   => 'publish',
  'post_excerpt'  => $custom_excerpt_field
);

wp_insert_post($new_post);

Not sure if I completely understand your question, so I've misunderstood something please let me know..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.