title: Search posts with meta data in Wordpress
body: <p>I have created a site for study in abroad and i want to create search form for courses in site. I have added meta box for posting, but i cannot solve search form for meta data in posts.</p>
  
  <p>Search form must be:</p>
  
  <p>1) Countries</p>
  
  <p>2) Course Languaes</p>
  
  <p>3) Course Types </p>
  
  <p>4) City of School </p>
  
  <p>This is code in <code>functions.php</code> </p>
  
  <pre><code>if ( ! function_exists( 'thim_add_course_meta' ) ) {
      function thim_add_course_meta( $meta_box ) {
          $fields             = $meta_box['fields'];
          $fields[]           = array(
              'name' =&gt; esc_html__( 'Yaş Həddi', 'eduma' ),
              'id'   =&gt; 'thim_course_age',
              'type' =&gt; 'text',
              'desc' =&gt; esc_html__( 'yas heddi', 'eduma' ),
              'std'  =&gt; esc_html__( '18', 'eduma' )
          );
  
          $fields[]           = array(
              'name' =&gt; esc_html__( 'Dil', 'eduma' ),
              'id'   =&gt; 'thim_course_language',
              'type' =&gt; 'text',
              'desc' =&gt; esc_html__( 'Language\'s used for studying', 'eduma' ),
              'std'  =&gt; esc_html__( 'English', 'eduma' )
          );
          $fields[]           = array(
              'name' =&gt; esc_html__( 'Şəhər', 'eduma' ),
              'id'   =&gt; 'thim_course_city',
              'type' =&gt; 'text',
              'desc' =&gt; esc_html__( 'Language\'s used for studying', 'eduma' ),
              'std'  =&gt; esc_html__( 'Şəhər', 'eduma' )
          );
          $fields[]           = array(
              'name' =&gt; esc_html__( 'Ölkə', 'eduma' ),
              'id'   =&gt; 'thim_course_country',
              'type' =&gt; 'text',
              'desc' =&gt; esc_html__( 'Language\'s used for studying', 'eduma' ),
              'std'  =&gt; esc_html__( 'Ölkə', 'eduma' )
          );
  
          $meta_box['fields'] = $fields;
  
          return $meta_box;
      }
  
  }
  </code></pre>
  
  <p>And how to i can change meta box type (from text to array)? </p>