Restrict the search filter to only specific meta keys

The Ultimate Member search function in the member directory displays results based on all the meta keys. If you need to only display specific results, it needs customization. You can add the code snippet to your child_theme's functions.php file or use the "Code Snippets" plugin. The code below will only search for the first name and last name fields: