Posted: January 7, 2014 at 11:58 am
|
I have the expresso calendar on my homepage. The filter by category dropdown does not function correctly. It will not show events in a specific category or display show all once I have selected a category. If I view the basic events table in the sidebar on a page without the expresso calendar. The dropdown works fine. So I assume there is a conflict between the calendar and the events table. Can you please help me fix this? |
|
I have narrowed down the issue to having the filter activated on the calendar. Hoe do I fix this? |
Hi David, Do you want both the event table and the calendar to display on the same page? |
|
|
Yes. |
|
One in page and one in sidebar widget space |
Hi David, Can you post a link to your home page so we can look into this? |
|
|
|
Hi David, If you open up the espresso-custom-template’s index.php file there’s a bit of jQuery at the bottom of the file. There is a line that reads: var ee_filter_cat_id = jQuery("option:selected").attr('class'); that you can try changing to: var ee_filter_cat_id = jQuery("#ee_filter_cat option:selected").attr('class'); Which should resolve the conflict. |
|
|
Worked like a charm! Thanks! |
|
Just noticed a new conflict. I added a custom field with a meta box. It is working correctly and displays in the sidebar on all pages except the homepage. Any suggestions? |
|
You can see the event_ceu working on this page: It is working in the event details and it is working in the sidebar in the widget. But it doesn’t work in the widget on any other page, including the homepage. |
Hi David, It’s likely not a conflict with the calendar jQuery since your custom fields are only being displayed on single event pages. (eg. There isn’t a calendar on the contact us page) When you modify the event table template to include a new column you’ll need to make sure the event_meta or other variables you are using are set. They’re set on the registration page, but not on other pages. The way forward is to be sure they’re set within the event table template. It may help to set the global variable for the event_meta within the table template like this: global $event_meta; |
|
|
Josh, Thanks for the suggestion, but I am not clear how to implement it. I am not an expert in php. Can you be a little more specific how and where I should include: into the table template Thanks! |
|
Hi, In the events table index.php about line 12 you should see global $this_event_id, $events, $wpdb; Change it to read global $this_event_id, $events, $wpdb, $event_meta; And that will make the $event_meta variable available to you. |
|
Thanks. Please take another look. |
|
I see, well it doesn’t work on any page unless there is the events. You may need to add that global $event_meta to the sidebar.php or perhaps to the page.php (both part of your theme). |
|
Dean, I add the following: <?php global $this_event_id, $events, $wpdb, $event_meta; ?> to both the sidebar.php and the page.php no difference. Am I doing something wrong? |
Hi David, I don’t think it’s necessary to add the global to page.php. It’s best to add it to the event table template. Simply adding the global variable may not help depending on the code that you wrote to include the extra column. You asked us to take another look, but without seeing the PHP code that you’re trying to use we’re kind of in the dark with this. If you’d like to post your modified code in a pastebin or a gist and link to it here we can at least take a look and offer suggestions from there. Please understand that this support thread started out with another issue and the issue you are having now has to do with a customization that you made. |
|
|
Josh, Thanks for your help with this issue. I am not really sure what is going on. The CEU column in the sidebar widget is not showing on any page but the registration page So I assume that the registration page is loading some code that allows the Meta Field to work in both locations. Here is a link to the index.html code for the custom table in the sidebar widget: Here is a link to the registration page code: I REALLY appreciate your help with this. It is driving me crazy! |
Hi David, It’s not really a conflict, but you are missing a few things here. In order to use the EE_META shortcode for a specific event it needs to be within the foreach loop (so the meta can be pulled for each event) It also needs to be unserialized. If you look in the template you’ll see the loop starts on line 41. You can add the meta variables there after the loop starts like this: foreach ($events as $event){ global $event_meta; $event_meta = unserialize($event->event_meta); |
|
|
Success!!! Thanks for sticking with me on these issues! |
The support post ‘Events Table and Espresso Calendar Conflict’ 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.