Home › Forums › Calendar Products › Events Calendar PRO › Events List Advanced Widget not showing any upcoming events
- This topic has 4 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
December 10, 2012 at 7:40 am #29189
Steve
ParticipantThe Events Calendar widget DOES show upcoming events but the Events List Advanced Widget and the Next Event Widget does NOT show any events but the message: “There are no upcoming events at this time.”
There are upcoming events and the Events List Advanced Widget is set to Show: 5, and Category: All Events.
Any clues as to where/how I can start debugging to see where the problem lies?December 10, 2012 at 9:17 pm #29211Jonah
ParticipantHi Steve,
That’s strange. The first thing I would suggest is to deactivate all other plugins and/or reverting to the Twenty Eleven theme because there very well could be a plugin or theme conflict. Try that and let me know what happens and we’ll go from there.
Thanks,
JonahDecember 11, 2012 at 12:56 pm #29254Steve
ParticipantJonah,
ECP is in use on a live site, so I’m not able to debug by deactivating other plugins or reverting to Twenty Eleven. However, I have found the source of the problem and solved it, so I’ll include my snippet here in case anyone else encounters this issue. Doesn’t appear to have been a problem with the Events List Advanced Widget. But I do wonder why the other 2 widgets worked fine without the following modification.
ECP is being used in a highly modified version of WooThemes Bookclub, which is itself a child theme of WooThemes listings. A custom post type was added for a new entity named “resource” which could be a document, an image file, or an audio/video clip. In order to get category archives to work like the client wanted, we needed to add the CPT to the query used to generate the category archive. In order to get Events List Widget to display upcoming events we added ‘tribe_events’ to the function in functions.php that modified the query:
/*——————————————————————–*/
/* add custom post types to archives page
/* needed to add ‘nav_menu_item’ to post_type array so that menus wouldn’t get filtered out. See comments on post below:
/* http://wpsnipp.com/index.php/archives/add-custom-post-types-to-archives-page/
/*———————————————————————-*/function add_custom_types_archive( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) {
$query->set( ‘post_type’, array(
‘post’, ‘resource’, ‘tribe_events’, ‘nav_menu_item’
));
return $query;
}
}
add_filter( ‘pre_get_posts’, ‘add_custom_types_archive’ );Hope this helps someone else who might have been doing their own head banging over this.
Steve
December 11, 2012 at 1:47 pm #29263Jonah
ParticipantHi Steve,
Glad you figured this out and thanks for sharing your solution!
– Jonah
July 7, 2015 at 6:26 am #978299Support 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 ‘Events List Advanced Widget not showing any upcoming events’ is closed to new replies.
