Hi Stephen! I’m attempting to set up a custom page to just show one event category; so am using a custom template for the first time with Event Organizer. I’m using the solution given here:
https://gist.github.com/stephenh1988/4165380
But I find that – even though I have
group_events_by=”series”
as part of my shortcode… ALL events of a series are being listed on my template.
Any suggestions as to why this might be?
Here’s the relevant part of my template code:
//Get upcoming
$events = eo_get_events(array(
'event_start_after'=>'today',
'showpastevents'=>false,//Will be deprecated, but set it to true to play it safe.
));
if( $events ){
global $post;
echo '';
foreach( $events as $post ){
setup_postdata($post);
?>
-
'> <h5><?php the_title(); ?></h5>
on <?php eo_get_the_start('jS F Y'); ?>
<?php the_excerpt(); ?>
<?php
}
echo '
';
wp_reset_postdata();
}else{
echo 'No Upcoming Events';
} ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) ); ?>
</section><!-- /.entry -->
Thanks!
adam

Adam Abrams

Adam Abrams
Hi Adam,
If you creating a custom page template then this is entirely separate from the shortcode. If you use the shortcode then the plug-in will use shortcode-event-list.php
template, so if you want to change the template, that’s the one to change (move it to your theme).
However, if you using a page template, then what you tell the template to display it will (including the “page content” as entered in the tinyMCE editor, or not, depending on how you define the template.)
If using the shortcode then:
[eo_events group_events_by="series"]
should work.
If you are using the API
$events = eo_get_events( array(
'group_events_by' => 'series',
) );
should also work.
If your page content simply contains the above, then it is ignoring the page content as entered by the user (i.e. in the tinyMCE editor) – including the shortcodes, and is simply displaying the events as set in your query.

Stephen Harris
Thanks Stephen!
I think the trouble must have been that this page, which I’d expected to list all the possible arguments:
http://codex.wp-event-organiser.com/function-eo_get_events.html
Doesn’t list “group_events_by” as a possible argument.
Am I missing something that would have led me to that info, or should it be added on the above page?
At any rate, thanks again for the info!
adam

Adam Abrams
Yes, you’re right, it should be listed there. I’ll update the codex.

Stephen Harris