Advertisement
Guest User

content-espresso_events-shortcode.php

a guest
Nov 16th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.63 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_false' );
  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_single() ) : ?>
  36.  
  37.     <div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
  38.         <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
  39.         <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
  40.     </div>
  41.  
  42.     <div class="espresso-event-wrapper-dv">
  43.         <?php the_content(); ?>
  44.         <?php //espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>
  45.         <?php //espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
  46.         <?php //espresso_get_template_part( 'content', 'espresso_events-details' ); ?>
  47.         <?php //espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
  48.         <footer class="event-meta">
  49.             <?php do_action( 'AHEE_event_details_footer_top', $post ); ?>
  50.             <?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?>
  51.         </footer>
  52.     </div>
  53.  
  54. <?php elseif ( is_archive() ) : ?>
  55.  
  56.     <div class="espresso-event-list-header-dv-<?php echo $post->ID;?> vc_row wpb_row vc_row-fluid mkd-section mkd-content-aligment-left" style="">
  57.       <div class="clearfix mkd-full-section-inner">
  58.         <div class="wpb_column vc_column_container vc_col-sm-4">
  59.           <div class="vc_column-inner ">
  60.             <div class="wpb_wrapper">
  61.                
  62.               <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
  63.              
  64.             </div>
  65.           </div>
  66.         </div>
  67.         <div class="wpb_column vc_column_container vc_col-sm-8">
  68.           <div class="vc_column-inner ">
  69.             <div class="wpb_wrapper">
  70.              
  71.               <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
  72.              
  73.               <div class="mkd-section-subtitle-holder mkd-section-subtitle-left" style="">
  74.                 <p style="text-align: left; font-weight:lighter;" class="mkd-section-subtitle"><?php if ( is_archive() && has_excerpt( $post->ID )): echo get_the_excerpt(); endif;?></p>
  75.               </div>
  76.              
  77.               <div class="mkd-section-subtitle-holder mkd-section-subtitle-left" style="">
  78.                 <h4 style="text-align: left" class="mkd-section-subtitle"><?php echo '<strong>Venue: </strong>'; espresso_venue_name(); ?></h4>
  79.               </div>
  80.  
  81.               <div class="mkd-section-subtitle-holder mkd-section-subtitle-left" style="">
  82.                 <p style="text-align: left" class="mkd-section-subtitle"><?php echo 'Entry Fee(s): '. espresso_event_tickets_available(); ?></p>
  83.               </div>
  84.              
  85.               <a href="<?php the_permalink(); ?>" target="_self" class="mkd-btn mkd-btn-small mkd-btn-gradient mkd-btn-fill-from-top mkd-btn-with-animation mkd-type1-gradient-left-to-right-2x mkd-btn-hover-outline"> <span class="mkd-btn-text">Register Now</span> <span class="mkd-btn-helper"></span> </a></div>
  86.           </div>
  87.         </div>
  88.       </div>
  89.     </div>
  90.  
  91. <?php endif; ?>
  92.  
  93. </article>
  94. <!-- #post -->
  95. <?php do_action( 'AHEE_event_details_after_post', $post );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement