update default search function and get postmeta entries

Im going to help you out here with code Im currently using on a project.

First you will need to add a query like mentioned in your question, to your theme’s functions.php file. Mines looks like this —Search Query Function

If you take a look at that code, you can see I have multiple custom fields and custom taxonomies. In the code you can see the different “compare” arguments used for things like minimum price to max price, and so forth. If you dont understand it, Im sure if you study it long enough it will start to make sense to you. Just replace/remove fields.

Ok so in order for this to correlate with your search form, you will need to create a custom form with your form fields having the same name attribute as those you set in the query. So with that query my search form looks like this —
Advanced Search Form

Also the form has to have a field with “s” parameter somewhere in there. It can be hidden with no value, but on my site if I dont have it there, no posts are ever found. Here’s an example of the field Im referring to, and how I have it —

 <input type="search" id="s" name="s" title="Search" placeholder="Address (optional)" class="form-control hideit" value="Search"  />

And on my search.php page, I have a normal loop —

 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                        <?php get_template_part('search','property'); ?>
                    <?php endwhile; endif; wp_reset_query(); ?>

Ok hopefully that should help get you in the right direction!