Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Event Search: Standard List
- *
- * The template is used for displaying the results of the event search [event_search] shortcode
- *
- * For a documentation of available functions (outputting dates, venue details etc) see http://wp-event-organiser.com/documentation/function-reference/
- *
- * **************** NOTICE: *****************
- *
- * @package Event Organiser Pro (plug-in)
- * @since 1.0
- */
- global $eo_event_loop;
- //Date % Time format for events
- $date_format = get_option( 'date_format' );
- $time_format = get_option( 'time_format' );
- ?>
- <?php if ( $eo_event_loop->have_posts() ): ?>
- <?php if ( $eo_event_loop->max_num_pages > 1 ) :
- //See http://codex.wordpress.org/Function_Reference/paginate_links
- $big = 999999999; // need an unlikely integer
- echo paginate_links( array(
- 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
- 'current' => max( 1, get_query_var( 'paged' ) ),
- 'total' => $eo_event_loop->max_num_pages
- ) );
- endif; ?>
- <?php while ( $eo_event_loop->have_posts() ): $eo_event_loop->the_post(); ?>
- <div class="<?php echo esc_attr(implode(' ',$eo_event_classes)); ?>" >
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
- <?php
- $image_ids = get_post_meta($post->ID, 'poster');
- foreach ($image_ids as $image)
- {
- $myupload = get_post($image);
- echo wp_get_attachment_image( $image, 'poster-thumb' );
- }
- ?>
- </a>
- <h2><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" ><?php the_title(); ?></a></h2>
- <!-- List date/dates of film -->
- <?php
- $occurrences = eo_get_the_occurrences_of( get_the_ID() );
- $movieDates = array();
- foreach( $occurrences as $occurrence_id => $occurrence ) {
- $movieDates[] = $occurrence['start']->format('l, F jS, Y \a\t g:i A');
- }
- echo '<strong>' . implode( ' / ', $movieDates ) . '</strong>';
- ?>
- <?php $now = new DateTime( 'now', eo_get_blog_timezone() );
- if( $now <= eo_get_schedule_last( DATETIMEOBJ ) ) {
- $readMoreText = '<strong>More info / Buy tickets</strong>';
- } else {
- $readMoreText = "More info";
- } ?>
- <?php echo apply_filters('the_excerpt',get_the_excerpt().' <a href="'.get_permalink().'">' . $readMoreText . '</a>'); ?>
- </div>
- <div class="clear" style="clear:both;"></div>
- <?php endwhile; ?>
- <?php if ( $eo_event_loop->max_num_pages > 1 ) :
- //See http://codex.wordpress.org/Function_Reference/paginate_links
- $big = 999999999; // need an unlikely integer
- echo paginate_links( array(
- 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
- 'current' => max( 1, get_query_var( 'paged' ) ),
- 'total' => $eo_event_loop->max_num_pages
- ) );
- endif; ?>
- <?php elseif ( ! empty( $eo_event_loop_args['no_events'] ) ): ?>
- <ul id="<?php echo esc_attr( $id );?>" class="<?php echo esc_attr( $classes );?>" >
- <li class="eo-no-events" > <?php echo $eo_event_loop_args['no_events']; ?> </li>
- </ul>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement