Event List excerpt not working…??
-
Hi there…I’m trying to include the event description in the list of events, and I can’t seem to get it to display. Here’s my code.
<?php if (is_page('10')) { ?> <hr style="margin:60px auto;" /> <?php $event_args = array( 'numberposts' => 10, 'orderby' => 'eventstart', 'order' => 'ASC', 'event_end_after' => 'now', ); $events = eo_get_events($event_args); if ($events): $return= ''; global $post; $temp = $post; foreach ($events as $post): ?> <div class="singleevent grid"> <div class="col-1-4"><?php echo get_the_post_thumbnail(get_the_ID(), 'thumbnail'); ?></div> <div class="col-3-4"><h2 class="entry-title event"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <div class="entry-meta"> <!-- Choose a different date format depending on whether we want to include time --> <?php if(eo_is_all_day()): ?> <!-- Event is all day --> <?php $date_format = 'l, F jS, Y'; ?> <?php else: ?> <!-- Event is not all day - include time in format --> <?php $date_format = 'l, F jS, Y g:ia'; ?> <?php endif; ?> <?php printf(__('<p>%s</p>','eventorganiser'), eo_get_the_start($date_format) );?> <?php if(eo_reoccurs()):?> <!-- Event reoccurs - is there a next occurrence? --> <?php $next = eo_get_next_occurrence($date_format);?> <?php if($next): ?> <!-- If the event is occurring again in the future, display the date --> <?php else: ?> <?php endif; ?> <?php else: ?> <!-- Event is a single event --> <?php endif; ?> </div><!-- .entry-meta --> </div><!-- .col-3-4 --> </div><!-- .singleevent --> <hr style="margin:60px auto;" /> <?php endforeach; //Reset post variable $post = $temp; endif; ?> <?php } ?>
I’m wanting to pull up the event description just after the close of the .entry-meta div. If I put in the_content(); , or the_excerpt(); it just pulls up the content/excerpt from page 10, rather than from that event. Any ideas on what I’m doing wrong?
Thanks in advance!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Event List excerpt not working…??’ is closed to new replies.