Modify post meta info on event archive page: add date and location

This commit is contained in:
2018-10-16 15:36:22 +07:00
parent 18d42c9800
commit 9fbe093d6f
3 changed files with 14 additions and 41 deletions
+8
View File
@@ -457,6 +457,14 @@ function corporate_post_info_date( $post_info ) {
$post_info = '[post_date]';
}
global $post;
$EM_Event = em_get_event($post->ID, 'post_id');
$location = $EM_Event->output('#_LOCATIONTOWN');
if (is_post_type_archive('event')) {
$post_info = '[field _event_start_date date_format="d/m/Y"]';
$post_info .= ' - '.$location;
}
return $post_info;