Created
October 28, 2016 13:09
-
-
Save baerkins/54bb449d3fa68a37d087bcbef16e3334 to your computer and use it in GitHub Desktop.
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
/** | |
* Allow past events to be queried in ACF Post Object | |
* Add 'custom' to query as per tribe_get_events(); | |
* | |
* @link https://theeventscalendar.com/knowledgebase/using-tribe_get_events/ | |
*/ | |
function my_relationship_query( $args, $field, $post ) { | |
$args['eventDisplay'] = 'custom'; | |
return $args; | |
} | |
add_filter('acf/fields/post_object/query', __NAMESPACE__ . '\\my_relationship_query', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment