I am currently making a site that will have coach pages. Each coach will have one page which is a custom post type and they will have their own login. Each coach will be able to create events using the ECP Community Events add on.
Currently on my coach-single.php template I am pulling in upcoming events. My goal is to only feed in events that relate to that current posts author. Hope that makes sense. This is the current code I am using.
<?php
global $post;
$all_events = tribe_get_events(
array(
'eventDisplay'=>'upcoming',
'posts_per_page'=>5,
)
);
foreach($all_events as $post) {
setup_postdata($post);
?>
<ul>
<li class="date"><?php echo tribe_get_start_date( $post->ID, false, 'M' ); ?><br/><span><?php echo tribe_get_start_date( $post->ID, false, 'j' ); ?></span></li>
<li class="title"><a href="<?php echo tribe_get_event_link(); ?>" rel="bookmark"><?php the_title(); ?></a></li>
<li class="time"><?php echo tribe_get_start_date( $post->ID, false, 'g:i a' ); ?></li>
</ul>
<?php } //endforeach ?>
<?php wp_reset_query(); ?>
I really have not done much else to this site but you can see and example of one of the pages at http://coaches.21daysugardetox.com/coaches/craig-moser/