Support

Home Forums Events Calendar Add-on Calendar Widget Event Times

Calendar Widget Event Times

Posted: June 30, 2016 at 8:51 am

Viewing 9 reply threads


etcwebdivision

June 30, 2016 at 8:51 am

I’ve made an event for a certain day with 3 times during that day. For example 5-6pm, 6-7pm, 7-8pm. Currently the calendar will show all 3 of theses times on the calendar but what I want is for it to just show up once. Is there a way to set it to only show up once on a day even if there’s multiple times?


Josh

  • Support Staff

June 30, 2016 at 1:36 pm

Is this for the Calendar widget only, or are you also looking to do this for the calendar that displays on a single page by adding the short code?


etcwebdivision

July 12, 2016 at 8:32 am

Sorry for the delay in response I forgot to check the follow-up replies box.

Currently I only need this for the calendar widget and not on a page with shortcode. Thanks.


Josh

  • Support Staff

July 12, 2016 at 6:41 pm

There isn’t currently a way to limit the date times to one per date in the widget. However, if you put the calendar short code on a page you can add the max_events_per_day parameter to the short code.

eg [ESPRESSO_CALENDAR max_events_per_day=1]


etcwebdivision

July 13, 2016 at 7:44 am

If I put that shortcode into a text widget and keep the calendar widget there as well it’s actually pulling in the settings from the calendar page so I’m making it work. I’ve used the shortcode [ESPRESSO_CALENDAR max_events_per_day=0] to make it so every day shows the view more text. I’ve done a bit of styling to get it to work how I want but I need help with one more thing. How can I have view more open a “basicDay” view instead of an “agendaDay” view. The “basicDay” view is much more clean for what I need. I can go in and edit the code myself if you can tell me which file this action is happening in.


etcwebdivision

July 13, 2016 at 11:53 am

Found it. I was able to change the view more text and change the view to basicDay in espresso_calendar.js. It would be nice if you could change these just like you can change everything else in the calendar advanced settings. Maybe a feature add-on? Thanks.


Josh

  • Support Staff

July 13, 2016 at 12:48 pm

You can alter the click event to open the basicDay view by adding the following code to your site (there’s no need to edit the calendar plugin’s code directly, which we do not recommend doing anyway)

https://gist.github.com/joshfeck/acc8c591ccfb3e9ea95dac4a60df4e0f

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


etcwebdivision

July 13, 2016 at 1:30 pm

Okay how could I also add this code that I’ve edited to show “view more” in the “basicWeek” view into the functions file as well?

// if this is a month view and this event is tagged as hidden...
			if ( (eeCAL.view == 'month' && event.className.indexOf('ee-extra-day-events') != -1) || (eeCAL.view == 'basicWeek' && event.className.indexOf('ee-extra-day-events')) ) {
				if ( ! event_target_date_td.find('.events-view-more').length ) {
                        		viewMoreButton = $('<div class="events-view-more"><a rel="' + event.target_date + '" class="events-view-more-link click-this"><span class="dashicons dashicons-plus"></span>View Tickets</a></div>').appendTo( event_target_date_td )
                        	}
//				console.log( JSON.stringify( 'NO eventRender event: ' + event.title, null, 4 ));
				// prevents event from being rendered
				return false 
//			} else {
//				console.log( JSON.stringify( 'eventRender event: ' + event.title, null, 4 ));
			}


Josh

  • Support Staff

July 13, 2016 at 1:54 pm

That’s going to be tricky to do since the code you’re trying to alter is within the call to the fullcalendar() method.

What you could do is dequeue the espresso_calendar script and enqueue your own instead.

Remember though, you’ll need to merge in any changes when future fixes and features become available via updates.


etcwebdivision

July 13, 2016 at 2:08 pm

That’s what I was thinking. The website I’m using it on is a seasonal site that runs only during the fall so I’m just going to make a note to go in and update the plugin and remake the changes during the off-season. Thanks for your support.

Viewing 9 reply threads

The support post ‘Calendar Widget Event Times’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso