I’d like to get the next occurrence of an event to appear below the heading of my events archive. I’ve played with adding some code from the events-archive.php to my own theme’s archive.php in various places, but am unable to find a way to get this to appear below the event title.
http://www.stnicholaskenilworth.org.uk/events/category/events/
get($themeslug.'_archive_breadcrumbs') == "1") { synapse_breadcrumbs();}?>
<!--Begin @synapse before content sidebar hook-->
<!--End @synapse before content sidebar hook-->
<div id="content" class="">
<!--Begin @synapse before_archive hook-->
<!--End @synapse before_archive hook-->
<div id="post-">
<time itemprop="startDate" datetime="">
<!--Begin @synapse archive hook-->
<!--End @synapse archive hook-->
<!--Begin @Core post tags hook-->
<!--End @Core post tags hook-->
<!--end post_class-->
<!--end post container-->
<!--Begin @iFeature post bar hook-->
<!--End @iFeature post bar hook-->
Nothing found
<!--Begin @synapse pagination hook-->
<!--End @synapse pagination hook-->
<!--Begin @synapse after_archive hook-->
<!--End @synapse after_archive hook-->
<!--end content_padding-->
<!--Begin @synapse after content sidebar hook-->
<!--End @synapse after content sidebar hook-->
<!--end content-->
Steve
Hi Steve,
You’ll want to edit the taxonomy-event-category.php
template. And you’ll want the eo_get_next_occurrence_of()
E.g.
//Inside the 'loop'
$next = eo_get_next_occurrence_of();
if( $next ){
$start = $next['start'];
echo 'Next occurrence is on '.$start->format('jS F Y');
}
Stephen Harris