This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Get any existing copy of our transient data | |
| if ( false === ( $special_query_results = get_transient( 'special_query_results' ) ) ) { | |
| // It wasn't there, so regenerate the data and save the transient | |
| $randargs = array('orderby' => 'rand', 'numberposts' => 20); | |
| $special_query_results = tribe_get_events($randargs); | |
| set_transient( 'special_query_results', $special_query_results, 60*60*12 ); | |
| } | |
| // Use the data like you would have normally... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| global $post; | |
| $myposts = tribe_get_events('post_type=tribe_events&posts_per_page=5&meta_key=_EventEndDate&orderby=meta_value&order=ASC&meta_compare=>=&meta_value='. date('Y-m-d G:i:s', current_time('timestamp'))); | |
| foreach($myposts as $post) : | |
| setup_postdata($post); | |
| ?> | |
| <?php date_default_timezone_set('America/Anchorage');?> | |
| <?php $event_date_raw = tribe_get_end_date( $post->ID, false, "Y-m-d G:i:s" ); | |
| $event_date = strtotime($event_date_raw); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function tribe_month_year_dropdowns( $prefix = ” ) { | |
| global $wp_query; | |
| if ( isset ( $wp_query->query_vars['eventDate'] ) ) { | |
| $date = $wp_query->query_vars['eventDate']; | |
| //$date = $wp_query->query_vars['eventDate'] . "-01"; | |
| } else { | |
| $date = date_i18n( TribeDateUtils::DBDATEFORMAT ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="tribe-events-event-list-meta" itemprop="location" itemscope itemtype="http://schema.org/Place"> | |
| <table cellspacing="0"> | |
| <?php if (tribe_is_multiday() || !tribe_get_all_day()): ?> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('Start:', 'tribe-events-calendar') ?></td> | |
| <td class="tribe-events-event-meta-value" itemprop="startDate" content="<?php echo tribe_get_start_date(); ?>"><?php echo tribe_get_start_date(); ?></td> | |
| </tr> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('End:', 'tribe-events-calendar') ?></td> | |
| <td class="tribe-events-event-meta-value" itemprop="endDate" content="<?php echo tribe_get_end_date(); ?>"><?php echo tribe_get_end_date(); ?></td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * If 'Default Events Template' is selected in Settings -> The Events Calendar -> Theme Settings -> Events Template, | |
| * then this file loads the page template for all ECP views except for the individual | |
| * event view. Generally, this setting should only be used if you want to manually | |
| * specify all the shell HTML of your ECP pages in this template file. Use one of the other Theme | |
| * Settings -> Events Template to automatically integrate views into your | |
| * theme. | |
| * | |
| * You can customize this view by putting a replacement file of the same name (ecp-page-template.php) in the events/ directory of your theme. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Don't load directly | |
| if ( !defined('ABSPATH') ) { die('-1'); } | |
| ?> | |
| <?php get_header(); ?> | |
| <?php get_template_part("subheader"); ?> | |
| <?php if (of_get_option('leftsidebar')==1) get_template_part('sidebarleft'); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="tribe-events-nav-previous"> | |
| <?php // Display Previous Page Navigation | |
| if( tribe_is_upcoming() && get_previous_posts_link() ) : ?> | |
| <?php previous_posts_link( '<span>'.__('« Previous Events', 'tribe-events-calendar').'</span>' ); ?> | |
| <?php elseif( tribe_is_upcoming() && !get_previous_posts_link( ) ) : ?> | |
| <a href='<?php echo tribe_get_past_link(); ?>'><span><?php _e('« Previous Events', 'tribe-events-calendar' ); ?></span></a> | |
| <?php elseif( tribe_is_past() && get_next_posts_link( ) ) : ?> | |
| <?php next_posts_link( '<span>'.__('« Previous Events', 'tribe-events-calendar').'</span>' ); ?> | |
| <?php else : ?> | |
| <span class="inactive"><?php _e('« Previous Events', 'tribe-events-calendar'); ?></span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(tribe_eb_get_id() != '') { | |
| echo "this is an eventbrite event"; | |
| } else { | |
| echo "this is not an eventbrite event"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo '<a href="<?php tribe_get_custom_field('Label For Custom Field Link'); ?>">My Link</a>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This is the template for the output of the events list widget. | |
| * All the items are turned on and off through the widget admin. | |
| * There is currently no default styling, which is highly needed. | |
| * | |
| * You can customize this view by putting a replacement file of the same name (events-list-load-widget-display.php) in the events/ directory of your theme. | |
| * | |
| * When the template is loaded, the following vars are set: $start, $end, $venue, $address, $city, $state, $province'], $zip, $country, $phone, $cost |