Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // DISPLAY EVENTS
- function mm_display_seminars() {
- global $wp_query, $sp_ecp;
- $old_display = $wp_query->get('eventDisplay');
- $wp_query->set('eventDisplay', 'upcoming');
- $event_options = array(
- 'numResults' => 3,
- 'eventCat' => 'seminars',
- );
- $event = sp_get_events( $event_options );
- ?>
- <div class="feature-cat feature-seminars">
- <h3><a href="">Seminars</a></h3>
- <ul>
- <?php
- foreach($event as $e){
- $event_month = date('M',strtotime($e->EventStartDate)); //Format the month
- $event_day = date('j',strtotime($e->EventStartDate)); //Format the day
- //$e->EventStartDate= date('F j, Y',strtotime($e->EventStartDate));
- if (strtotime($e->EventStartDate) != strtotime($e->EventEndDate)) {
- ?>
- <li><div class="date">
- <div class="date-inner">
- <span class="month"><?php echo $event_month; ?></span>
- <span class="day"><?php echo $event_day; ?></span>
- </div></div>
- <div class="txt">
- <p><a class="read-more-title-link" href="<?php echo home_url(); ?>/event/<?php echo $e->post_name; ?>"><?php echo $e->post_title; ?></a></p>
- </div></li>
- <?php }
- }
- ?>
- </ul><a class="lnk-more" href="<?php echo get_bloginfo('url'); ?>/calendar/category/seminars/upcoming">more</a>
- </div>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement