Hi,
Have you tried giving your textarea the id and name of excerpt?
hi, yes i tried this already, but as soon as i change the original line:
“<textarea name=”content” rows=”10″ …..”
into
“<textarea name=”excerpt” rows=”10″ …..”
the text is not saved, either as post_content or as post_excerpt. Theres no id assigned to the textarea. Adding id=”excerpt” doesn’t help either.
My problem is in the first place: i made my theme show normal posts and events together by adding the events posttype to the functions.php.
But the event-posts on the homepage contain a mixture of unnecessary map information and the post_content. When the event has an excerpt, it shows correctly on the homepage.
thanks,
N
you need to hook into em_event_save to save your custom excerpt;
eg.
add_filter('em_event_save','post_excerpt_event_save',1,2);
function post_excerpt_event_save( $result, $EM_Event ){
wp_update_post( array( 'ID' => $EM_Event->post_id, 'post_excerpt' => $_POST['post_excerpt'] ) );
return $result;
}
Where should i place your code? I tried the class em-event.php, but that didn’t help.
Are any additional changes to event-editor.php needed?
That code needs to go in the functions.php file of your theme.