michelcote1

single-espresso_event.php_1

Jul 14th, 2012
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. * Template for displaying all single event posts.
  4. * @package WordPress
  5. * @subpackage Twenty_Ten
  6. * @since Event Espresso 3.0.17
  7. * last updated for 3.1.20.P by Chris Reynolds
  8. */
  9. get_header(); ?>
  10.  
  11. <div id="container" class="event-display-boxes">
  12. <div id="content" role="main" class="event_espresso_form_wrapper event-data-display">
  13.  
  14. <?php if ( have_posts() ) while ( have_posts() ) : the_post();
  15.  
  16. // GET POST CUSTOM FIELDS //
  17. //For more information on the get_post_meta function, check out this page:
  18. //http://codex.wordpress.org/Function_Reference/get_post_meta
  19.  
  20. //Here's a bunch of variables you can use in your template
  21. $event_identifier = get_post_meta($post->ID, 'event_identifier', true);
  22. $event_id = get_post_meta($post->ID, 'event_id', true);
  23. $event_start_date = get_post_meta($post->ID, 'event_start_date', true);
  24. $event_end_date = get_post_meta($post->ID, 'event_end_date', true);
  25. $event_thumbnail_url = get_post_meta($post->ID, 'event_thumbnail_url', true);
  26. $event_location = get_post_meta($post->ID, 'event_location', true);
  27. $event_address = get_post_meta($post->ID, 'event_address', true);
  28. $event_address2 = get_post_meta($post->ID, 'event_address2', true);
  29. $event_city = get_post_meta($post->ID, 'event_city', true);
  30. $event_state = get_post_meta($post->ID, 'event_state', true);
  31. $event_country = get_post_meta($post->ID, 'event_country', true);
  32. $event_phone = get_post_meta($post->ID, 'event_phone', true);
  33. $event_externalURL = get_post_meta($post->ID, 'event_externalURL', true);
  34. $event_registration_start = get_post_meta($post->ID, 'event_registration_start', true);
  35. $event_registration_end = get_post_meta($post->ID, 'event_registration_end', true);
  36. $event_cat = do_shortcode('[CATEGORY_NAME event_id="'.$event_id.'"]'); // displays the event category name, not used in this template but you can add it in
  37. $event_price = '$' . do_shortcode('[EVENT_PRICE event_id="'.$event_id.'" number="0"]'); // this only displays the first price, change the currency symbol to the one that applies to you
  38. $event_date = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="start_date" format="l, F j, Y"]'); // change the date format if you so desire http://php.net/manual/en/function.date.php
  39. $event_time = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="start_time"]');
  40. $event_end_time = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="end_time"]');
  41. $event_venue = do_shortcode('[ESPRESSO_VENUE event_id="'.$event_id.'"]'); // modify this shortcode to display the venue however you want http://eventespresso.com/support/documentation/shortcodes-template-variables/#venue
  42. $event_attendees_min_max = do_shortcode('[ATTENDEE_NUMBERS event_id="'.$event_id.'" type="num_attendees"]') . '/' . do_shortcode('[ATTENDEE_NUMBERS event_id="'.$event_id.'" type="reg_limit"]');
  43. $event_attendees = do_shortcode('[ATTENDEE_NUMBERS event_id="'.$event_id.'" type="available_spaces"]');
  44. $show_venue = '0'; // set this to 1 if you want to display the venue (this assumes you have venues set up so the default is to set this to 0 for off)
  45. $show_attendees = '1'; // display number of attendees? set this to 0 if you don't want the attendee numbers. to change how they are displayed, change the shortcode in the $event_attendees variable above
  46. //the_meta(); //this function displays all the meta values for the post -- more info here: http://codex.wordpress.org/Function_Reference/the_meta
  47. //This gets the data that is entered into the custom write panels
  48. //http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/
  49. //$event_meta = get_post_meta( $post->ID, 'event_meta', true );
  50. ?>
  51. <p> Hello world </p>
  52.  
  53. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  54. <h3 class="entry-title"><?php the_title(); ?></h3>
  55.  
  56. <div class="entry-content">
  57. <div class="event_description">
  58. <?php the_content(); ?>
  59. </div>
  60. <!-- <p>Event ID: <?php echo $event_id; ?></p> -->
  61. <p class="start_date">
  62. <span class="section-title">Date: </span>
  63. <?php echo $event_date; ?>
  64. </p>
  65.  
  66. <?php echo do_shortcode('[ESPRESSO_REG_FORM event_id="'.$event_id.'"]');?>
  67.  
  68. <?php wp_link_pages( array( 'before' => '<div class="page_link">' . __( 'Pages:', MYSITE_TEXTDOMAIN ), 'after' => '</div>' ) ); ?>
  69. </div><!-- .entry-content -->
  70.  
  71. <div class="entry-utility">
  72. <?php // alternately, you could us this to display the event category:
  73. /*
  74. <p><?php echo $event_cat; ?></p>
  75. */ ?>
  76. <?php edit_post_link( __( 'Edit', MYSITE_TEXTDOMAIN ), '<div class="edit_link">', '</div>' ); ?>
  77. </div><!-- .entry-utility -->
  78.  
  79. </div><!-- #post-## -->
  80.  
  81. </div><!-- #content -->
  82. </div><!-- #container -->
  83.  
  84. <?php mysite_after_post(); ?>
  85.  
  86. <?php comments_template( '', true ); ?>
  87.  
  88. <?php endwhile; # end of the loop. ?>
  89.  
  90. <?php mysite_after_page_content(); ?>
  91.  
  92. <div class="clearboth"></div>
  93. </div><!-- #main_inner -->
  94. </div><!-- #main -->
  95.  
  96. <?php get_footer(); ?>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×