Skip to content

Elementor custom query filter with WPEM functions #1394

Closed Answered by davidstaab
davidstaab asked this question in Q&A
Discussion options

You must be logged in to vote

I figured it out. Code for anybody curious. It depends on WPEM keeping their database schema stable, but I'm pretty sure that's a reliable assumption.

/* Query the WP Event Manager plugin for all future events, sorted by date/time ascending
 * This snippet follows the Elementor guidance at
 * 		https://developers.elementor.com/docs/hooks/custom-query-filter/
 */
function wpem_query_by_event_date_future( $query ) {
	# DS: I wrote this by looking at WPEM's source code at
	# 	https://github.com/wpeventmanager/wp-event-manager/
	# 	because they don't have any published developer documentation (yet).
	
	// Get current meta Query. If not exists, init as empty.
	$meta_query = $query->get( 'meta_…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by davidstaab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant