I just created the shortcode :). I share it in case anyone need it. It works with the events calendar and extract data for Date, Time and Venue.
add_shortcode( 'evento_tec', 'evento_tec' );
function evento_tec( $atts ) {
// Attributes
extract( shortcode_atts(
array(
'field' => '',
), $atts
));
switch ( $field ) {
case '_EventStartDate':
if ( $field ) {
$display_time = false;
return "?? " . tribe_format_date( get_post_meta( get_the_ID(), $field, true ), $display_time, "j \d\\e F \d\\e Y" ) . "<br/>??" . tribe_format_date( get_post_meta( get_the_ID(), $field, true ), $display_time, "G:i" );
}
case '_EventVenueID':
if ( $field) {
return "?? " . tribe_get_venue($field);
}
}
return $value;
}
Thanks for your help!
-
This reply was modified 6 days, 20 hours ago by
kaostc.
-
This reply was modified 6 days, 19 hours ago by
kaostc.