Home › Forums › Calendar Products › Events Calendar PRO › the events for a particular weekday by weekday
- This topic has 2 replies, 3 voices, and was last updated 10 years, 3 months ago by
Support Droid.
-
AuthorPosts
-
November 5, 2015 at 10:48 am #1022273
Katherine
ParticipantThe following code used to give us all the events for a particular weekday by weekday. Can anyone tell me how to do it now with the changed API?
<?php
/**
* Week List View Loop
* This file sets up the structure for the week list view loop
*
*///error_reporting(E_ALL);
//ini_set(‘display_errors’, 1);if ( !defined(‘ABSPATH’) ) { die(‘-1’); } ?>
<?php // Show hourly events only ?>
<?php tribe_events_week_set_loop_type( ‘hourly’ ); ?><div class=”events-list-view”>
<?php while ( tribe_events_week_have_days() ) : tribe_events_week_the_day(); ?>
<?php if (tribe_events_current_week_day_has_events()) : ?>
<div id=”<?php tribe_events_week_get_the_date(); ?>” class=”day-wrapper”>
<?php // Header ?><span>+</span>
<?php echo get_formatted_date_title(tribe_events_week_get_the_date(false)); ?>
<div class=”col colweek”>
<?php
// Backup global post
global $post;
$backup = $post;// Events loop
foreach ( tribe_events_week_get_hourly() as $event ) : if ( tribe_events_week_setup_event($event) ) :// This does the trick!
$event = tribe_events_week_get_event();
$post = $event;
?>
<div id=”post-<?php the_ID() ?>” class=”list-item event”>
<?php tribe_get_template_part( ‘week/single’, ‘event’ ) ?>
</div>
<?php endif; endforeach;// Reset post value
$post = $backup;
?>
</div>
</div>
<?php else: ?>
<div id=”<?php tribe_events_week_get_the_date(); ?>” class=”day-wrapper”>
<?php // Header ?><span>+</span>
<?php echo get_formatted_date_title(tribe_events_week_get_the_date(false)); ?>
<div class=”col colweek”>
<p style=”margin: -15px 0px 30px 0px;”>“Please note there are no organized activities scheduled for today but the parks are open for your enjoyment!” </p>
</div>
</div><?php endif; endwhile; ?>
</div>November 6, 2015 at 7:34 am #1022547Brian
MemberHi,
Thanks for using our plugins. I can try to help out here.
I am not sure how this coding even worked before.
It appears to be part of the Week View.
Did you recently update Pro from a version before 3.10?
The Week View was completely redone in 3.10 and that might be one reason why.
Is there more coding then this?
Let me know and I can try to help out.
Thanks
February 18, 2016 at 8:30 am #1075451Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘the events for a particular weekday by weekday’ is closed to new replies.
