Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save digisavvy/008250a58d2806e283391a64a39adf5a to your computer and use it in GitHub Desktop.
Save digisavvy/008250a58d2806e283391a64a39adf5a to your computer and use it in GitHub Desktop.

Just some snippets of working with Bricks Builder and the Events Calendar. Definitely not comprehensive. If you are comfortable finding post meta for an tribe_events post, you can then use Bricks' dynamic data tags to get most of the data you need and then write some PHP to get any data or format things as needed.

Convert the Date/Time to another format to display only start and end time.

<?php
$post_id = get_the_ID();

$start_time = get_post_meta( $post_id, '_EventStartDate', true );
$end_time = get_post_meta( $post_id, '_EventEndDate', true );

$start_formatted_time = date_i18n( 'g:i a', strtotime( $start_time ) );
$end_formatted_time = date_i18n( 'g:i a', strtotime( $end_time ) );

$formatted_time_range = $start_formatted_time . ' - ' . $end_formatted_time;

echo $formatted_time_range;
?>

Dynamic Tags and get_post_meta()

Get Virtual Meeting URL {echo:get_post_meta({post_id},'_tribe_events_virtual_url', true)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment