title: Wordpress: WP_Query how to apply search criteria with custom post type
body: <p>I have a custom post type, <code>photo</code>, and need to search for photos matching the title or description with the search keyword with various criteria: contains <code>LIKE %$search_term%</code>, starts with <code>LIKE $search_term%</code> etc. I have the following query, but this doesn't filter records according to <code>$search_term</code>. Please direct me to the right direction to embed this requirement with this query.</p>
  
  <pre><code>$search_term = $_GET['term'];
  $search_criteria = $_GET['type'];
  
  $loop = new WP_Query( array(
      'post_type' =&gt; 'photo',
      'posts_per_page' =&gt; 12,
      'orderby'=&gt; 'post_date'
  ));
  </code></pre>
  
  <p>Please be nice with me, I am a newbie in Wordpress and don't even know if I am asking a foolish question. But I am really stuck with it and need a solution. Any help will be appreciated a lot. Thank you everybody.</p>