Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.24 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div class="post-title col-full">
  4.  
  5. <?php
  6. //Woo Settings
  7. $woo_calendar_formatting = get_option('woo_calendar_formatting');
  8. $woo_booking_form = get_option('woo_booking_form');
  9. ?>
  10. <?php if (have_posts()) : $count = 0; ?>
  11. <?php while (have_posts()) : the_post(); $count++; ?>
  12.  
  13. <?php if (in_category( get_option('woo_events_category') )) { $is_event = true; } ?>
  14. <?php
  15. //Post Meta
  16. $event_start_date = get_post_meta($post->ID,'event_start_date',true);
  17. $event_end_date = get_post_meta($post->ID,'event_end_date',true);
  18. $event_start_time = get_post_meta($post->ID,'event_start_time',true);
  19. $event_end_time = get_post_meta($post->ID,'event_end_time',true);
  20. $event_location = get_post_meta($post->ID,'event_location',true);
  21. ?>
  22. <?php if ($is_event) { ?>
  23. <script type="text/javascript">
  24. jQuery(document).ready(function(){
  25.  
  26. jQuery('.add-calendar').each(function(){
  27. jQuery(this).parent().find('ul').hide();
  28. jQuery(this).click(function() {
  29. jQuery(this).parent().find('ul').toggle();
  30. });
  31. jQuery(this).parent().find('ul li').each(function() {
  32. jQuery(this).find('a').click(function() {
  33. jQuery(this).parent().parent().hide();
  34. });
  35. });
  36. });
  37. });
  38. </script>
  39. <?php if ($woo_booking_form == 'disabled') { ?>
  40. <style type="text/css">
  41. #events-calendar .event .buttons ul li.tip {
  42. left:18% !important;
  43. }
  44. </style>
  45. <?php } ?>
  46. <?php $js_formatting = stripslashes($woo_calendar_formatting); ?>
  47. <?php switch ($js_formatting) {
  48. /*case "mm/dd/yy" :
  49. $php_formatting = "m\/d\/Y";
  50. break;
  51. case "yy-mm-dd" :
  52. $php_formatting = "Y\-m\-d";
  53. break;
  54. case "d M, y" :
  55. $php_formatting = "d M, Y";
  56. break;
  57. case "d MM, y" :
  58. $php_formatting = "d F Y";
  59. break;
  60. case "DD, d MM, yy" :
  61. $php_formatting = "l, d F, Y";
  62. break;
  63. case "'day' d 'of' MM 'in the year' yy" :
  64. $php_formatting = "\\d\a\y d \\o\\f F \\i\\n \\t\h\e \\y\e\a\\r Y";
  65. break;*/
  66. default :
  67. $php_formatting = "m\/d\/Y";
  68. break;
  69. } ?>
  70. <?php } ?>
  71.  
  72. <div class="fl event-name">
  73.  
  74. <h1 class="title"><?php the_title(); ?></h1>
  75.  
  76.  
  77. <p class="date">
  78. <p class="startdate"><?php $customField = get_post_custom_values("dateandtime"); if (isset($customField[0])) { echo "".$customField[0];}?><br />
  79.  
  80. <span class="location"><?php $customField = get_post_custom_values("address"); if (isset($customField[0])) { echo "".$customField[0];}?></span>
  81. </p>
  82. </div>
  83.  
  84. <?php if ($is_event) { ?>
  85. <?php if ($woo_booking_form == 'disabled' && get_option('woo_events_ical_export') == 'false') { } else { ?>
  86.  
  87. <div class="event fr">
  88. <div class="buttons">
  89. <?php if ($woo_booking_form == 'disabled') { } else { ?>
  90. <a href="<?php if ($woo_booking_form == 'bookingurl') { echo get_option('woo_booking_form_external_url'); } else { echo get_bloginfo('url').'/'.get_option('woo_booking_form_page').'/?event_id='.$post->ID; } ?>" class="button book-tickets"><?php _e('Book Tickets', 'woothemes'); ?></a>
  91. <?php } ?>
  92. <?php if (get_option('woo_events_ical_export') == 'true') { ?>
  93. <a onclick="" class="button add-calendar"><?php _e('Add to Calendar', 'woothemes'); ?></a>
  94. <?php $icalurl = woo_get_ical($post->ID,$php_formatting); ?>
  95. <ul>
  96. <li class="outlook"><a href="<?php echo $icalurl['ical']; ?>" title="Microsoft Outlook">Microsoft Outlook</a></li>
  97. <li class="ical"><a href="<?php echo $icalurl['ical']; ?>" title="Apple iCal">Apple iCal</a></li>
  98. <li class="google"><a href="<?php echo $icalurl['google']; ?>" target="_blank" title="Google Calendar">Google Calendar</a></li>
  99. <li class="tip">&nbsp;</li>
  100. </ul>
  101.  
  102. <?php } ?>
  103. </div>
  104. </div>
  105.  
  106. <?php } ?>
  107.  
  108.  
  109. <?php } ?>
  110.  
  111. </div>
  112.  
  113.  
  114. <div id="content" class="col-full">
  115.  
  116. <div id="main" class="col-left">
  117.  
  118. <div <?php post_class(); ?>>
  119.  
  120.  
  121.  
  122. <p class="post-meta">
  123. <span class="small"><?php _e('Written by', 'woothemes') ?></span> <span class="post-author"><?php the_author_posts_link(); ?></span>
  124. <span class="small"><?php _e('on', 'woothemes') ?></span> <span class="post-date"><?php the_time($GLOBALS['woodate']); ?></span>
  125. <span class="small"><?php _e('in', 'woothemes') ?></span> <span class="post-category"><?php the_category(', ') ?></span>
  126. <?php edit_post_link( __('- Edit', 'woothemes'), '<span class="small">', '</span>' ); ?>
  127. </p>
  128.  
  129. <div class="entry">
  130.  
  131. <?php the_post_thumbnail(array( 300, 9999 ), array('class' => 'alignleft post_thumbnail', 'alt' => 'alttext', 'title' => 'titletext')); ?>
  132.  
  133. <?php $video = woo_embed('width=525&height=300'); ?>
  134. <?php
  135. if (!empty($video)){ ?>
  136. <div class="video <?php echo $GLOBALS['single_align']; ?>">
  137. <?php echo $video; ?>
  138. </div><!-- /.image -->
  139. <?php } ?>
  140.  
  141. <?php the_content(); ?>
  142. </div>
  143.  
  144. <!-- Event Map -->
  145. <?php include (TEMPLATEPATH . "/includes/featured-single.php"); ?>
  146. <!-- Event Map end -->
  147.  
  148. <?php the_tags('<p class="tags">Tags: ', ', ', '</p>'); ?>
  149.  
  150. <?php woo_postnav(); ?>
  151.  
  152. </div><!-- /.post -->
  153.  
  154. <?php $comm = get_option('woo_comments'); if ( 'open' == $post->comment_status && ($comm == "post" || $comm == "both") ) : ?>
  155. <?php comments_template('', true); ?>
  156. <?php endif; ?>
  157.  
  158. <?php endwhile; else: ?>
  159. <div class="post">
  160. <p><?php _e('Sorry, no posts matched your criteria.', 'woothemes') ?></p>
  161. </div><!-- /.post -->
  162. <?php endif; ?>
  163.  
  164. </div><!-- /#main -->
  165.  
  166. <?php get_sidebar(); ?>
  167.  
  168. </div><!-- /#content -->
  169.  
  170. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement