Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- YARPP Template: Thumbnails
- Description: Requires a theme which supports post thumbnails
- */ ?>
- <?php
- global $post;
- $EM_Event = em_get_event($post->ID, 'post_id');
- ?>
- <?php if (have_posts()):?>
- <h3 class="sub">Other Events you May Like</h3>
- <?php while (have_posts()) : the_post();
- $EM_Event = em_get_event($post->ID, 'post_id');
- $eventdate = date('Y-m-d', $EM_Event->start);
- $today = date('Y-m-d',current_time('timestamp')); ?>
- <?php if ($eventdate >= $today): ?>
- <?if ( has_post_thumbnail() ):?>
- <ul id='related_posts_thumbnails'>
- <li>
- <?php $d = date_i18n(get_option('dbem_date_format'), $EM_Event->start); ?><?php $t = date_i18n(get_option('time_format'), $EM_Event->start) ; ?>
- <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('270x150'); ?><span><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title_attribute(); ?><br />
- <p class="left"><?php echo $d ; ?></p><p class="right"><?php echo $t ; ?> </p>
- </a></a></span></li>
- </ul>
- <?php endif; ?>
- <?php endif; ?>
- <?php endwhile; ?>
- <?php else: ?>
- <h3 class="sub">Other Events you May Like</h3>
- <p>No similar events...</p>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement