Created
September 29, 2023 13:45
-
-
Save reformatco/e796c0fc86ce93d834ea9e28ef89420c to your computer and use it in GitHub Desktop.
Allow past events custom query with 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
// You can save original $wp_filter | |
remove_action('parse_query', 'Tribe__Events__Query::parse_query', 50); | |
remove_action('parse_query', 'Tribe__Events__Query::filter_and_order_by_date', 1000); | |
// Run your query | |
$query = new WP Query() | |
// Reinstate the parse_query filters here in case you need it later on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment