title: Wordpress search via metadata
body: <p>Here's what I'm trying to achieve:</p>
  
  <p>I have a custom search form to search for posts based on various metadata.</p>
  
  <p>This code contains the settings for the WordPress search: <a href="http://pastebin.com/5dj16Atj" rel="nofollow">http://pastebin.com/5dj16Atj</a>
  The references to the custom fields are all in there.</p>
  
  <p>This code is referenced in the file above and contains the actual layout for the custom search form: <a href="http://pastie.org/private/yebozm9kaqazywkilr8fkq" rel="nofollow">http://pastie.org/private/yebozm9kaqazywkilr8fkq</a></p>
  
  <p>My main problem is that only 3 fields work in the custom search form, namely; Price Range and Area. The remaining fields such as Property Type (srch_ptype), age (srch_age) and City just don't show up as criteria in the search. I would like all the fields to be functional and get included as criteria when people are searching.
  Kindly take a look at both files to see what I have gotten wrong.</p>
  
  <p>Thanks a lot.</p>
  
  <p>Edit:
  adomnom was kind enough to suggest that i use wp_query for the search. I would appreciate if anyone can tell me how to connect the search form with the query.</p>