I’m testing out your plugin to figure out which event plugin I want to use for a few sites. I’ve written a custom loop (once using eo_get_events and another using wp_query). In both instances I am unable to use the_excerpt or the_content to display the events content. Oddly enough echo get_the_content() works just fine in both loops, but echo get_the_excerpt() does not. I have Excerpts checked in settings as a supported feature for Events. Any ideas on why this would be happening?
Here is the code:
<?php
//Get upcoming '
$args = array(
'numberposts'=>3,
'event_start_after'=>'today',
'showpastevents'=>true,
'post_type'=>'event',
'suppress_filters'=>false
);
$eventloop = new WP_Query( $args );
if ( $eventloop->have_posts() ) :?>
<?php
while ( $eventloop->have_posts() ) : $eventloop->the_post();
?>
-
'>
<h5><?php the_title(); ?></h5>
on <?php eo_the_start('jS F Y'); ?>
<?php the_excerpt(); ?>
<?php
endwhile;
wp_reset_postdata();
?>
<?php
else :
echo 'No Upcoming Events';
endif;
?>
Josh
Hi Josh,
They should both work find. Also, the_content()
is little more than echo get_the_content()
, so if one works, then so should the other. If you have any further questions about this, please use the support forums, as this forum is intended for pre-sales questions.
Stephen Harris