Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save champsupertramp/2f68b8cf74f5c83244ab3d2e1184c6f9 to your computer and use it in GitHub Desktop.
Save champsupertramp/2f68b8cf74f5c83244ab3d2e1184c6f9 to your computer and use it in GitHub Desktop.
Ultimate Member - Display Profiles with Today's Birthdays in the Member Directory
add_filter("um_prepare_user_query_args","um_061522_show_todays_birthdays", 10, 2 );
function um_061522_show_todays_birthdays( $query_args, $directory_data ){
$directory_id = $directory_data['form_id'];
if( 320 !== $directory_id ) return $query_args;
$query_args['meta_query'][ ] = array(
'key' => 'birth_date',
'value' => date("/m/d"),
'compare' => 'RLIKE'
);
$query_args['orderby'] = array(
'first_name' => 'ASC',
);
return $query_args;
}
@viprogress777
Copy link

This code doesn't work, it's confusing people

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment