Support

Home Forums Events Calendar Add-on First event on calendar does not show until view is switch

First event on calendar does not show until view is switch

Posted: May 4, 2013 at 10:01 am


Jordan Lejuwaan

May 4, 2013 at 10:01 am

I have a recurring 2-day event for this month. The first instance of this event only shows up as being on the second day in the calendar UNTIL after I switch the view from month to week, then back to month. Then it shows up just fine.

Using WP 3.5.1 and EE 3.1.32 and Calendar 2.0.5


Josh

  • Support Staff

May 6, 2013 at 9:58 am

Hi Jordan,

Can you post a link to the calendar so we can investigate?

Thanks!


Jordan Lejuwaan

May 6, 2013 at 10:37 am

It’s the event on May 11th

http://valhallamovement.com/calendar


Josh

  • Support Staff

May 7, 2013 at 9:58 am

Hi Jordan,

Thanks for posting the link. It turns out that there is an open ticket to fix this issue. It’s been noted that the dates display correctly if the theme roller option is set to “on” in Event Espresso>Template settings.

The downside of setting the themeroller options to “on” is it will also apply themeroller styles to the registration pages. There is a way to make it so the themeroller styles only apply to the calendar, and I can help you set that up if you’d like.

Does that sound like a work around you’d be willing to use in the meantime?


Jordan Lejuwaan

May 7, 2013 at 10:54 am

Yeah that works for now. Please let me know how!


Josh

  • Support Staff

May 7, 2013 at 11:52 am

Okay, there are a few steps involved here, but nothing too terribly complicated.

1) The first thing I would do is make sure that the calendar scripts and styles only get loaded on the calendar page. You can do this by adding the page ID of the calendar in Event Espresso>Calendar settings to the Page(s) Displaying the Calendar. For your site, the page ID of the calendar is 1860, so that’s what you can enter there.

2) The themeroller settings are found in Event Espresso>Template settings. You’ll need to temporarily activate themeroller, then select a theme. Something like “Start” might be a good choice for your site. Once you select a theme, save the options, then you can disable themeroller and save the options again.

3) You’ll need to open up the espresso-calendar.php file and make a small edit. If you look around line 475 or so there will be a line that says //jQuery UI themeroller. Just below that is a check to see if themeroller is activated. We need to remove that check. One way to do this is by commenting out the two lines that wrap the theme: true statement. It will look like this:

<?php
if ( function_exists('espresso_version') ) {
	//if ( (!empty($org_options['style_settings']['enable_default_style']) && $org_options['style_settings']['enable ...
	echo "theme: true,";
	//}
}
?>

Note that the commented lines have the two slashes in front like this: //

After you save the changes, if you visit the calendar page, you’ll see the dates display in the correct places, but it won’t look too nice because it’s not using the built-in calendar CSS.

There are a few ways to add-on the themeroller CSS. I put together a function that will automatically load the selected themeroller stylesheet (even if themeroller is off) on the calendar page. You can add this to the custom functions file of the custom files add-on -or- directly into your WordPress theme’s functions.php file:

You will need to be careful about whether or not to include the starting and ending php tags depending on how your theme’s functions.php file is set up. In a lot of cases, there is only one starting php tag in a functions.php file, so you would not copy them here in this case.


Jordan Lejuwaan

May 8, 2013 at 9:17 pm

That fixed it. Thanks so much! Should I create a bug ticket for this?


Josh

  • Support Staff

May 9, 2013 at 9:01 am

Hi Jordan,

There’s already one created. Thanks for checking though.

The support post ‘First event on calendar does not show until view is switch’ 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