Created
May 30, 2012 17:51
-
-
Save jo-snips/2837925 to your computer and use it in GitHub Desktop.
The Events Calendar: Custom List Meta w/Buy Button
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> | |
| </tr> | |
| <?php else: ?> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('Date:', '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> | |
| <?php endif; ?> | |
| <?php | |
| $venue = tribe_get_venue(); | |
| if ( !empty( $venue ) ) : | |
| ?> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('Venue:', 'tribe-events-calendar') ?></td> | |
| <td class="tribe-events-event-meta-value" itemprop="name"> | |
| <? if( class_exists( 'TribeEventsPro' ) ): ?> | |
| <?php tribe_get_venue_link( get_the_ID(), class_exists( 'TribeEventsPro' ) ); ?> | |
| <? else: ?> | |
| <?php echo tribe_get_venue( get_the_ID() ) ?> | |
| <? endif; ?> | |
| </td> | |
| </tr> | |
| <?php endif; ?> | |
| <?php | |
| $phone = tribe_get_phone(); | |
| if ( !empty( $phone ) ) : | |
| ?> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('Phone:', 'tribe-events-calendar') ?></td> | |
| <td class="tribe-events-event-meta-value" itemprop="telephone"><?php echo $phone; ?></td> | |
| </tr> | |
| <?php endif; ?> | |
| <?php if (tribe_address_exists( get_the_ID() ) ) : ?> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('Address:', 'tribe-events-calendar'); ?><br /> | |
| <?php if( get_post_meta( get_the_ID(), '_EventShowMapLink', true ) == 'true' ) : ?> | |
| <a class="gmap" itemprop="maps" href="<?php echo tribe_get_map_link(); ?>" title="Click to view a Google Map" target="_blank"><?php _e('Google Map', 'tribe-events-calendar' ); ?></a> | |
| <?php endif; ?></td> | |
| <td class="tribe-events-event-meta-value"><?php echo tribe_get_full_address( get_the_ID() ); ?></td> | |
| </tr> | |
| <?php endif; ?> | |
| <?php | |
| $cost = tribe_get_cost(); | |
| if ( !empty( $cost ) ) : | |
| ?> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('Cost:', 'tribe-events-calendar') ?></td> | |
| <td class="tribe-events-event-meta-value" itemprop="price"><?php echo $cost; ?></td> | |
| </tr> | |
| <?php endif; ?> | |
| <tr> | |
| <td class="tribe-events-event-meta-desc"><?php _e('Buy now:', 'tribe-events-calendar') ?></td> | |
| <td class="tribe-events-event-meta-value" itemprop="buy-now"><a href="<?php echo tribe_get_event_link(); ?>" class="tribe-events-button-book-now">Buy Now</a></td> | |
| </tr> | |
| </table> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment