Guest User

Untitled

a guest
Sep 3rd, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 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 = EEH_Event_View::get_event();
  30. $event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : '';
  31. $event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class );
  32. ?>
  33. <?php do_action( 'AHEE_event_details_before_post', $post ); ?>
  34. <article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>>
  35.  
  36. <?php if ( is_archive() ) : ?>
  37. <div class="kgm-single-course-box">
  38.  
  39. <div class="kgm-course-title">
  40. <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
  41. </div>
  42.  
  43. <div class="kgm-course-details">
  44. <?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
  45. <?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
  46. <?php $keyvalue2 = get_post_meta( get_the_ID(), 'Ages', true );
  47. // Check if the custom field has a value.
  48. if ( ! empty( $keyvalue2 ) ) {
  49. echo 'Ages: ' , $keyvalue2;
  50. } ?>
  51. </div>
  52.  
  53. <div id="espresso-event-thumbnail" class="kgm-course-thumbnail">
  54. <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
  55. </div>
  56.  
  57. <div class="kgm-course-desc">
  58. <?php $event->description(); ?>
  59. <div class="kgm-course-register-bttn"><?php espresso_view_details_btn($event); ?></div>
  60. <?php $keyvalue = get_post_meta( get_the_ID(), 'Barcode', true );
  61. // Check if the custom field has a value.
  62. if ( ! empty( $keyvalue ) ) {
  63. echo 'Barcode: ' , $keyvalue;
  64. } ?>
  65. </div>
  66.  
  67. </div>
  68.  
  69. <?php endif; ?>
  70.  
  71. </article>
  72. <!-- #post -->
  73. <?php do_action( 'AHEE_event_details_after_post', $post );
  74.  
  75.  
Add Comment
Please, Sign In to add comment