I am using The Events Calendar plugin to display calendar events on a website. The trick is that the client wants the events that fall on the same day to be listed together. And, if possible, to only show the upcoming 2 months.
[B]For example,
Nov. 10, 2015
Accelerated payroll deductions
Nov. 15, 2015
Regular payroll deductions
Nov. 20, 2015
Canada Child Tax Benefit
Nov. 30, 2015
Corporate tax installments
Corporate tax returns
Universal Child Care Benefit[/B]
I was able to create a loop that shows my events, but they are all shown individually with the date for each:
<?php query_posts(array( ‘post_type’ => ‘tribe_events’ ) );
while (have_posts()) : the_post(); $url = esc_url( get_permalink( tribe_get_venue_id( $post->ID))); ?>
<h3><a href=”<?php the_permalink() ?>”><?php the_title(); ?></a></h3>
<p><?php echo tribe_get_start_date($post->ID, true, $format = ‘F j, Y – l’ );?><br>
<?php echo tribe_get_venue_link()?></p>
<?php endwhile;?>
[B]So it outputs:
Accelerated payroll deductions November 10, 2015 – Tuesday
Regular payroll deductions November 15, 2015 – Sunday
Canada Child Tax Benefit November 20, 2015 – Friday[/B]
And so on! Can somebody help me with this loop so I can show my events grouped by date, and possible have a function that shows automatically the next two months’ worth of events?
Thanks a bunch