Events not loading
-
I am using the Genesis child theme Showcase Pro. Showing the event calendar seemed a bit of a problem, so I used this snippet in my custom functions.php:
add_action( 'get_header', 'tribe_genesis_bypass_genesis_do_post_content' ); function tribe_genesis_bypass_genesis_do_post_content() { if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) { if ( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() || ( tribe_is_recurring_event() && ! is_singular( 'tribe_events' ) ) ) { remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); add_action( 'genesis_entry_content', 'the_content', 15 ); } } elseif ( class_exists( 'Tribe__Events__Main' ) && ! class_exists( 'Tribe__Events__Pro__Main' ) ) { if ( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) { remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); add_action( 'genesis_entry_content', 'the_content', 15 ); } } }
This succesfully showed the calendar, but there was another problem. The calendar is normally in the mode that it shows each month. The days were not displaying well, and were like 5px in width. I used this CSS line to fix that:
.tribe-events-calendar tbody tr td { float:none; }
But, now the events are not showing. I have made at least 3 events, but none of them is showing. I have already tried the ‘refresh permalinks’ fix, and other snippets provided by Tribe or other people, but none of them are working. After looking inside the plugin, I found out that the loop that displays the events returns
null
.I hope someone knows a fix for this!
- The topic ‘Events not loading’ is closed to new replies.