Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created April 14, 2016 14:04
Show Gist options
  • Save Pebblo/8994a8abe05f0717d9f9ced5eec6294a to your computer and use it in GitHub Desktop.
Save Pebblo/8994a8abe05f0717d9f9ced5eec6294a to your computer and use it in GitHub Desktop.
Example of how to display custom meta values just below the datetime list. 'testing_meta' will need to be the meta key you want to pull for the event.
<?php
//Example of how to display custom event meta just after the Datetime List section,
//this will be diplsayed on both the single event and event list sections.
function ee_event_meta_after_datetime_list( $post ) {
$event = EEM_Event::instance()->get_one_by_ID( $post->ID );
$event_meta = $event->get_post_meta( 'testing_meta' , true );
echo $event_meta;
}
add_action( 'AHEE_event_details_after_event_date', 'ee_event_meta_after_datetime_list' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment