Hi guys,
Just saw an other topic about that feature : here
I needed the functionality myself so I came up with this :
function please_update_slug( $data, $postarr ) {
if($data['post_type'] == 'tribe_events') {
if ( !in_array( $data['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) {
$post_id = $postarr['ID'];
$value = $_POST["EventStartDate"];
$date = new DateTime($value);
$data['post_name'] = sanitize_title( $data['post_title'] . '-' . $date->format('d-m-Y'));
}
}
return $data;
}
add_filter( 'wp_insert_post_data', 'please_update_slug', 99, 2 );
Just place this in your function.php and each time you create / save an event, the permalink of your event will be [event title]-[event-start-date].
Hope it helps someone.
Peace.