Events Manager Events Not Showing Up
I am attempting to work with the events manager plugin but when I go work with my events in the dashboard, none of them show up despite it saying that there are 294 total that exist (see image attached). Any idea what is happening?
#1 Updated by Boone Gorges over 2 years ago
- File Screenshot_2019-02-18_09-20-53.png Screenshot_2019-02-18_09-20-53.png added
- Category name set to WordPress Plugins
- Status changed from New to Resolved
- Target version set to Not tracked
Hi Mark - By default, it appears that the list shows "Future events" only. Select "all events" in the dropdown to see events that have happened in the past. See screenshot.
#2 Updated by Mark Webb over 2 years ago
Sorry, should have mentioned I tried that already. All of the menu options in fact and nothing is showing up. Equally worrisome, when I create a menu that includes each of the event categories that should have past events, nothing shows up when I click on those menu items.
#4 Updated by Mark Webb over 2 years ago
- File Screenshot (1).png Screenshot (1).png added
- File discussion.JPG discussion.JPG added
- File categories.JPG categories.JPG added
So there should be hundreds of events listed in the discussion category, but when I click on the menu item which is linked to the event category it says there are none.
#5 Updated by Boone Gorges over 2 years ago
The query taking place on this page is for upcoming events. See the "Upcoming Events" label on the top of the directory in your screenshot. Here's the SQL statement being generated - long, but you can see the relevant event_end clause:
SELECT SQL_CALC_FOUND_ROWS wp_1109_posts.* FROM wp_1109_posts LEFT JOIN wp_1109_term_relationships ON (wp_1109_posts.ID = wp_1109_term_relationships.object_id) INNER JOIN wp_1109_postmeta ON ( wp_1109_posts.ID = wp_1109_postmeta.post_id ) INNER JOIN wp_1109_postmeta AS mt1 ON ( wp_1109_posts.ID = mt1.post_id ) LEFT JOIN wp_1109_postmeta c ON wp_1109_posts.ID = c.post_id and c.meta_key like '_wplp_%' and (( wp_1109_posts.post_type in ('post','page') and c.meta_key not like "_wplp_") OR ( wp_1109_posts.post_type='page' and (c.meta_key in ( '_wplp_hide_frontpage') ))) WHERE 1=1 AND ( wp_1109_term_relationships.term_taxonomy_id IN (263) ) AND ( wp_1109_postmeta.meta_key = '_event_start' AND ( ( mt1.meta_key = '_event_end' AND CAST(mt1.meta_value AS DATETIME) >= '2019-02-18 16:56:54' ) ) ) AND wp_1109_posts.post_type = 'event' AND (wp_1109_posts.post_status = 'publish' OR wp_1109_posts.post_status = 'private') AND c.post_id IS NULL GROUP BY wp_1109_posts.ID ORDER BY CAST(wp_1109_postmeta.meta_value AS DATETIME) DESC LIMIT 0, 8
This same "upcoming" filtering isn't happening on the top-level Events archive because it's a custom post type archive, as opposed to an "event category"; the Events Manager plugin is filtering the latter to show upcoming events only.
I'm unsure that there's a way to show a list of past events using the Event Category menu items as you've done here. As a workaround, you might consider creating custom pages for each event category, and then populating using an Events Manager shortcode. See http://wp-events-plugin.com/documentation/shortcodes/, and especially the 'scope' and 'category' attributes: http://wp-events-plugin.com/documentation/event-search-attributes/
#6 Updated by Mark Webb over 2 years ago
Ok, that makes sense. I just remembered how to link the past events archive page to a page you create and designate as such, so now all of the past events are displayed there.
I do, however, wish to delete a few events, namely a "test" event I created to try something out a few months ago. I am still not seeing any events listed in the events manager plugin in the "events" tab. Any ideas as to why that is?
#7 Updated by Boone Gorges over 2 years ago
What happens when you navigate directly to this URL? https://cpcp.commons.gc.cuny.edu/wp-admin/edit.php?post_status=all&post_type=event&m=0&scope=all&event-categories=0&filter_action=Filter&paged=1 Or this one https://cpcp.commons.gc.cuny.edu/wp-admin/edit.php?s=test&post_status=all&post_type=event&action=-1&m=0&scope=all&event-categories=0&action2=-1&orderby=date-time&order=desc
#8 Updated by Mark Webb over 2 years ago
That does take me where I want to go, which is strange because before selecting "all events" in the menu did not bring anything up.
A related question now that I have set up an archives page for events. Why does nothing show up when I search specific titles of events I know are on the page? Even typing in the word "the" reveals no results.
#9 Updated by Boone Gorges over 2 years ago
I'm unsure how the Events Manager search is supposed to work, but at a glance, this is a related issue to the one above: by default, only future events are returned. When I toggle Show Advanced Search and select a date range that includes some past dates, I'm able to return past events. I don't see a way to change the default behavior in the UI or in the database; it looks like you'd have to build a child theme with a custom search template (events-manager/templates/templates/events-search.php, and add a proper 'scope' argument to the $args array).