Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <h1 class="entry-title" style="display: inline;">
- <?php
- //If it has one, display the thumbnail
- the_post_thumbnail('thumbnail', array('style'=>'float:left;margin-right:20px;'));
- ?>
- <a href="<?php the_permalink(); ?>"><?php the_title();?></a>
- </h1>
- <div class="event-entry-meta">
- <!-- Output the date of the occurrence-->
- <?php
- //Format date/time according to whether its an all day event.
- //Use microdata https://support.google.com/webmasters/bin/answer.py?hl=en&answer=176035
- if( eo_is_all_day() ){
- $format = 'F d, Y';
- $microformat = 'Y-m-d';
- }else{
- $format = 'd F Y '.get_option('time_format');
- $microformat = 'c';
- }?>
- <!-- <time itemprop="startDate" datetime="<?php eo_the_start($microformat); ?>"><?php eo_the_start($format); ?></time> -->
- <?php echo 'Run: ' . eo_get_schedule_start('M j, Y') . ' — ' . eo_get_schedule_last('M j, Y') . ' ' ; ?>
- <?php
- /* DATE-BASED NOTICES */
- $today = new DateTime( 'today', eo_get_blog_timezone() );
- $last = eo_get_schedule_last( DATETIMEOBJ );
- $lastTodayDiff = (int) eo_date_interval( $last, $today, '%a' );
- if ( $today == $last ) { // ends today
- $messageBox = "<span class='notice finalNight'>Final Night</span>";
- }
- if ( ($lastTodayDiff > 0 && $lastTodayDiff < 4) && $today < $last ) {
- $messageBox = "<span class='notice endsSoon'>Ends Soon</span>";
- }
- if ( $messageBox ) {
- echo $messageBox;
- }
- $messageBox = '';
- ?>
- <!-- Display event meta list -->
- <?php echo eo_get_event_meta_list(); ?>
- <!-- Show Event text as 'the_excerpt' or 'the_content' -->
- <?php echo apply_filters('the_excerpt',get_the_excerpt().' <a href="'.get_permalink().'"><strong>Read more</strong></a>'); ?>
- </div><!-- .event-entry-meta -->
- <div style="clear:both;"></div>
- </header><!-- .entry-header -->
- </article><!-- #post-<?php the_ID(); ?> -->
- <?php endwhile; ?><!--The Loop ends-->
- <?php echo adrotate_group(1); ?>
- <!-- Navigate between pages-->
- <?php
- if ( $wp_query->max_num_pages > 1 ) : ?>
- <nav id="nav-below">
- <div class="nav-next events-nav-newer"><?php next_posts_link( __( 'Later events <span class="meta-nav">→</span>' , 'eventorganiser' ) ); ?></div>
- <div class="nav-previous events-nav-newer"><?php previous_posts_link( __( ' <span class="meta-nav">←</span> Newer events', 'eventorganiser' ) ); ?></div>
- </nav><!-- #nav-below -->
- <?php endif; ?>
- <?php else : ?>
- <!-- If there are no events -->
- <article id="post-0" class="post no-results not-found">
- <header class="entry-header">
- <h1 class="entry-title"><?php _e( 'Nothing Found', 'eventorganiser' ); ?></h1>
- </header><!-- .entry-header -->
- <div class="entry-content">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. ', 'eventorganiser' ); ?></p>
- </div><!-- .entry-content -->
- </article><!-- #post-0 -->
- <?php endif; ?>
- </article>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement