Guest User

ECP template override for List Widget view

a guest
Feb 26th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. <?php
  2. /**
  3. * Events Pro List Widget Template
  4. * This template overrides the default Events Pro List Widget Template. The style in this template replicates the mini calendar widget style but without the grid itself (it's just the list of events). Place this in your own theme by creating a file at [your-theme]/tribe-events/widgets/list-widget.php. You'll still need to provide styling.
  5. *
  6. * When the template is loaded, the following vars are set: $start, $end, $venue,
  7. * $address, $city, $state, $province'], $zip, $country, $phone, $cost
  8. *
  9. * @package TribeEventsCalendarPro
  10. * @since 1.0
  11. * @author Modern Tribe Inc.
  12. *
  13. */
  14.  
  15. if ( !defined('ABSPATH') ) { die('-1'); } ?>
  16. <?php $sttime = tribe_get_start_date($post, false, 'h:i A');
  17. $endtime = tribe_get_end_date($post, false, 'h:i A');?>
  18. <li class="footer-tribe-event-list">
  19. <div class="one_fifth footer-list-date">
  20. <span class="footer-list-dayname"><?php echo tribe_get_start_date($post, false, 'M' ); ?></span>
  21. <span class="footer-list-daynumber"><?php echo tribe_get_start_date($post, false, 'd' ); ?></span>
  22. </div>
  23. <div class="four_fifth last footer-event-details">
  24. <h6 class="footer-event-title"><a href="<?php echo tribe_get_event_link() ?>" rel="bookmark"><?php the_title(); ?></a></h6>
  25. <?php if ( $cost && tribe_get_cost() ) { ?>
  26. <span class="tribe-mini-calendar-event-cost"><?php echo tribe_get_cost( null, true ); ?></span>
  27. <div class="tribe-events-divider ">|</div>
  28. <?php } ?>
  29. <?php if(tribe_event_is_all_day() == false) {echo $sttime . ' &ndash; ' . $endtime;} else {echo $sttime;}; ?>
  30. <span class="fn org tribe-venue"><?php echo tribe_get_venue_link(); ?></span>
  31.  
  32. <?php if ( $address && tribe_get_address() != '' ) { ?>
  33. <span class="street-address"><?php echo tribe_get_address(); ?></span>
  34. <?php } ?>
  35.  
  36. <?php if ( $city && tribe_get_city() != '' ) { ?>
  37. <span class="locality"><?php echo tribe_get_city(); ?></span>
  38. <?php } ?>
  39.  
  40. <?php if ( $region && tribe_get_region() !='' ) { ?>
  41. <span class="region"><?php echo tribe_get_region(); ?></span>
  42. <?php } ?>
  43.  
  44. <?php if ( $zip && tribe_get_zip() != '' ) { ?>
  45. <span class="postal-code"><?php echo tribe_get_zip(); ?></span>
  46. <?php } ?>
  47.  
  48. <?php if ( $country && tribe_get_country() != '') { ?>
  49. <span class="country-name" style="display:none;"><?php echo tribe_get_country(); ?></span>
  50. <?php } ?>
  51.  
  52. <?php if ( $organizer && tribe_get_organizer() != '' ) { ?>
  53. <?php _e( 'Organizer:', 'tribe-events-calendar-pro' ); ?>
  54. <span class="tribe-organizer"><?php echo tribe_get_organizer_link(); ?></span>
  55. <?php } ?>
  56.  
  57. <?php if ( $phone && tribe_get_phone() != '' ) { ?>
  58. <span class="tel"><?php echo tribe_get_phone(); ?></span>
  59. <?php } ?>
  60. </div>
  61. </li>
Advertisement
Add Comment
Please, Sign In to add comment