Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template for displaying all single event posts.
- * @package WordPress
- * @subpackage Twenty_Ten
- * @since Event Espresso 3.0.17
- * last updated for 3.1.20.P by Chris Reynolds
- */
- get_header(); ?>
- <div id="container" class="event-display-boxes">
- <div id="content" role="main" class="event_espresso_form_wrapper event-data-display">
- <?php if ( have_posts() ) while ( have_posts() ) : the_post();
- // GET POST CUSTOM FIELDS //
- //For more information on the get_post_meta function, check out this page:
- //http://codex.wordpress.org/Function_Reference/get_post_meta
- //Here's a bunch of variables you can use in your template
- $event_identifier = get_post_meta($post->ID, 'event_identifier', true);
- $event_id = get_post_meta($post->ID, 'event_id', true);
- $event_start_date = get_post_meta($post->ID, 'event_start_date', true);
- $event_end_date = get_post_meta($post->ID, 'event_end_date', true);
- $event_thumbnail_url = get_post_meta($post->ID, 'event_thumbnail_url', true);
- $event_location = get_post_meta($post->ID, 'event_location', true);
- $event_address = get_post_meta($post->ID, 'event_address', true);
- $event_address2 = get_post_meta($post->ID, 'event_address2', true);
- $event_city = get_post_meta($post->ID, 'event_city', true);
- $event_state = get_post_meta($post->ID, 'event_state', true);
- $event_country = get_post_meta($post->ID, 'event_country', true);
- $event_phone = get_post_meta($post->ID, 'event_phone', true);
- $event_externalURL = get_post_meta($post->ID, 'event_externalURL', true);
- $event_registration_start = get_post_meta($post->ID, 'event_registration_start', true);
- $event_registration_end = get_post_meta($post->ID, 'event_registration_end', true);
- $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
- $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
- $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
- $event_time = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="start_time"]');
- $event_end_time = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="end_time"]');
- $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
- $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"]');
- $event_attendees = do_shortcode('[ATTENDEE_NUMBERS event_id="'.$event_id.'" type="available_spaces"]');
- $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)
- $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
- //the_meta(); //this function displays all the meta values for the post -- more info here: http://codex.wordpress.org/Function_Reference/the_meta
- //This gets the data that is entered into the custom write panels
- //http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/
- //$event_meta = get_post_meta( $post->ID, 'event_meta', true );
- ?>
- <p> Hello world </p>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <h3 class="entry-title"><?php the_title(); ?></h3>
- <div class="entry-content">
- <div class="event_description">
- <?php the_content(); ?>
- </div>
- <!-- <p>Event ID: <?php echo $event_id; ?></p> -->
- <p class="start_date">
- <span class="section-title">Date: </span>
- <?php echo $event_date; ?>
- </p>
- <?php echo do_shortcode('[ESPRESSO_REG_FORM event_id="'.$event_id.'"]');?>
- <?php wp_link_pages( array( 'before' => '<div class="page_link">' . __( 'Pages:', MYSITE_TEXTDOMAIN ), 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <div class="entry-utility">
- <?php // alternately, you could us this to display the event category:
- /*
- <p><?php echo $event_cat; ?></p>
- */ ?>
- <?php edit_post_link( __( 'Edit', MYSITE_TEXTDOMAIN ), '<div class="edit_link">', '</div>' ); ?>
- </div><!-- .entry-utility -->
- </div><!-- #post-## -->
- </div><!-- #content -->
- </div><!-- #container -->
- <?php mysite_after_post(); ?>
- <?php comments_template( '', true ); ?>
- <?php endwhile; # end of the loop. ?>
- <?php mysite_after_page_content(); ?>
- <div class="clearboth"></div>
- </div><!-- #main_inner -->
- </div><!-- #main -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement