function display_post($post, $classes, $thumbnail) { $id = $post->ID; ?> <div class="<?php echo $classes; ?> "> <?php $thumb = get_the_post_thumbnail($id, $thumbnail, array('class' => 'post_thumbnail')); if ($thumb) { $class = 'text'; } else { $thumb = '<div class="no-img"></div>'; $class = 'text-no-img'; } ?> <a href="<?php echo get_permalink($id); ?> "><?php echo $thumb; ?> </a> <div class="<?php echo $class; ?> "> <h3><a href="<?php echo get_permalink($id); ?> "><?php echo $post->post_title; ?> </a></h3> <p class="date"><?php echo EventPostType::get_date($id, array('date_fmt' => 'jS F Y', 'date_label' => '', 'time_label' => '', 'date_time_separator' => ', ', 'time_separator' => ' – ', 'date_separator' => ' – ')); ?> </p> <div class="excerpt"> <?php echo $post->post_excerpt; ?> </div> </div> </div> <?php }
<?php the_content(); ?> </div><!-- .entry-content --> <div class="entry-meta"> <?php EventPostType::posted_in(); ?> </div><!-- .entry-meta --> </div><!-- #post-## --> <div id="nav-below" class="navigation"> <div class="nav-previous"><?php EventPostType::previous_event_link('%link', '<span class="meta-nav prev">' . _x('←', 'Previous event', 'event-post-type') . '</span> %title'); ?> </div> <div class="nav-next"><?php EventPostType::next_event_link('%link', '%title <span class="meta-nav next">' . _x('→', 'Next event', 'event-post-type') . '</span>'); ?> </div> </div><!-- #nav-below --> <?php } } // end of the loop. ?> <?php get_footer();