Custom query help! #18410
joelinit1
announced in
Developers Community
Custom query help!
#18410
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all! I'm looking for help with a custom query and am a bit stumped! I have a registration form whereby users can effectively choose posts they'd like to see - the post IDs are then saved to their profile as a custom field called breakout_choices . My query works if they only select one post, but returns nothing if they select multiple. Any ideas?!?!
add_action( 'elementor/query/breakout_choices', function( $query ) {
$user_id = get_current_user_id();
$meta = get_user_meta( $user_id, 'breakout_choices', true );
$query->set( 'page_id', $meta );
} );
Beta Was this translation helpful? Give feedback.
All reactions