Created
September 25, 2014 22:37
-
-
Save mrwweb/db2f2808bfd751528df3 to your computer and use it in GitHub Desktop.
"Disabliing AJAX" in Event Views (List, Month, etc.) in The Event Calendar by Modern Tribe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These two files at least seem to disable the AJAX functionality in The Events Calendar by Modern Tribe that interferes with the pre_get_posts action. I was using that to modify the Upcoming and Past Events Lists so I had to find a way to disable the AJAX. Really, the plugin should just work with pre_get_posts, but that's not the case at least for now... | |
Thanks for the initial idea and starting point from @coreymcollins: https://wordpress.org/support/topic/disable-ajax-pagination?replies=4#post-5204802 | |
This is very very very much a hack, and a sad one at that. It requires overriding the tribe_* paging functions with the core WordPress ones and then blowing away the entire filter bar. | |
Note the locations these two files go in a theme to override the corresponding files in The Events Calendar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Events Navigation Bar Module Template | |
* Renders our events navigation bar used across our views | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/modules/bar.php | |
* | |
* $filters and $views variables are loaded in and coming from | |
* the show funcion in: lib/tribe-events-bar.class.php | |
* | |
* @package TribeEventsCalendar | |
* @since 3.0 | |
* @author Modern Tribe Inc. | |
* | |
*/ | |
?> | |
<?php | |
$filters = tribe_events_get_filters(); | |
$views = tribe_events_get_views(); | |
?> | |
<?php do_action('tribe_events_bar_before_template') ?> | |
<?php /* bye bye nav bar :( */ ?> | |
<?php do_action('tribe_events_bar_after_template') ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment