Guest User

Untitled

a guest
Aug 26th, 2020
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. <?php
  2. /**
  3. * This template will display a single event - copy it to your theme folder
  4. *
  5. * @ package Event Espresso
  6. * @ author Seth Shoultes
  7. * @ copyright (c) 2008-2013 Event Espresso All Rights Reserved.
  8. * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing *
  9. * @ link http://www.eventespresso.com
  10. * @ version 4+
  11. */
  12.  
  13. /*************************** IMPORTANT *************************
  14. * if you are creating a custom template based on this file,
  15. * and do not wish to use the template display order controls in the admin,
  16. * then change the following filter to:
  17. * add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_true' );
  18. * comment out calls to the_content() and espresso_event_content_or_excerpt()
  19. * then UN-comment and position the additional template parts
  20. * that are loaded via the espresso_get_template_part() function to your liking
  21. * and/or use any of the template tags functions found in:
  22. * \wp-content\plugins\event-espresso-core\public\template_tags.php
  23. ************************** IMPORTANT **************************/
  24. add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_true' );
  25.  
  26. //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' &nbsp; <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';
  27.  
  28. global $post;
  29. $event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : '';
  30. $event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class );
  31. ?>
  32. <?php do_action( 'AHEE_event_details_before_post', $post ); ?>
  33. <article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>>
  34.  
  35. <?php if ( is_archive() ) : ?>
  36. <div class="kgm-single-course-box">
  37.  
  38. <div class="kgm-course-title">
  39. <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
  40. </div>
  41.  
  42. <div class="kgm-course-details">
  43. <?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
  44. <?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
  45. <?php $keyvalue2 = get_post_meta( get_the_ID(), 'Ages', true );
  46. // Check if the custom field has a value.
  47. if ( ! empty( $keyvalue2 ) ) {
  48. echo 'Ages: ' , $keyvalue2;
  49. } ?>
  50. </div>
  51.  
  52. <div id="espresso-event-thumbnail" class="kgm-course-thumbnail">
  53. <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
  54. </div>
  55.  
  56. <div class="kgm-course-desc">
  57.  
  58. <?php espresso_view_details_btn($event); ?>
  59. <?php $keyvalue = get_post_meta( get_the_ID(), 'Barcode', true );
  60. // Check if the custom field has a value.
  61. if ( ! empty( $keyvalue ) ) {
  62. echo 'Barcode: ' , $keyvalue;
  63. } ?>
  64. </div>
  65.  
  66. </div>
  67.  
  68. <?php endif; ?>
  69.  
  70. </article>
  71. <!-- #post -->
  72. <?php do_action( 'AHEE_event_details_after_post', $post );
  73.  
  74.  
Add Comment
Please, Sign In to add comment