Skip to content

Instantly share code, notes, and snippets.

@bordoni
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save bordoni/d1f7f000ba9ec66123d2 to your computer and use it in GitHub Desktop.

Select an option

Save bordoni/d1f7f000ba9ec66123d2 to your computer and use it in GitHub Desktop.
Reposition Custom Meta for events
<?php
/*
* If you already have something in your functions.php, please remove these first few lines
*/
add_action( 'init', 'tec_forum_939510', 11 );
function tec_forum_939510(){
remove_action( 'tribe_events_single_event_meta_primary_section_end', array( TribeEventsPro::instance()->single_event_meta, 'additional_fields' ), 10 );
add_action( 'tribe_events_single_meta_details_section_end', array( TribeEventsPro::instance()->single_event_meta, 'additional_fields' ), 10 );
}
<?php
/**
* Single Event Meta (Additional Fields) Template
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe-events/modules/meta/details.php
*
* @package TribeEventsCalendarPro
*/
if ( ! isset( $fields ) || empty( $fields ) || ! is_array( $fields ) ) {
return;
}
?>
<?php foreach ( $fields as $name => $value ): ?>
<dt> <?php echo $name ?> </dt>
<dd class="tribe-meta-value"> <?php echo $value ?> </dd>
<?php endforeach ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment