title: how to get custom post type by user id/author
body: <p>so, i've custom post type 'pelajaran'. and I made the select option (location and subjects) search for custom post type.</p>
  
  <p>I took the data (location + subjects) and the value from the user. this my code for select option</p>
  
  <pre><code>$query      = get_users('role=GURU&amp;order=ASC&amp;orderby=meta_value&amp;meta_key=address');
  
  
  &lt;select name="location"&gt;
             &lt;option&gt;Location&lt;/option&gt;
                  &lt;?php foreach ($query as $q) { 
                  $address = get_the_author_meta('address', $q-&gt;ID); ?&gt;
             &lt;option value="&lt;?php echo $q-&gt;ID; ?&gt;"&gt;&lt;?php echo $address; ?&gt;&lt;/option&gt;
  
                  &lt;?php } ?&gt;
   &lt;/select&gt;
  </code></pre>
  
  <p>when the results came out, because the value of the id of the user. whether it can retrieve the data of custom post type from user id / author?</p>
  
  <p>this my code for the result, on another page :</p>
  
  <pre><code>&lt;?php
      global $current_user;
      get_currentuserinfo();
  
      $location = "";
      if (isset($_POST['location'])) {
          $location = $_POST['location'];
      }
  
      $args = array (
          'post_type' =&gt; 'pelajaran',
          'author'        =&gt;  $current_user-&gt;ID,
          'posts_per_page'    =&gt; -1,
      );
  
      $pelajaran = get_posts($args);
  
      for($i=0;$i&lt;sizeof($pelajaran);$i++) { ?&gt;
  
       &lt;?php if($location == $pelajaran[$i]-&gt;ID )
      echo ' '; //some my code html here
  
        ?&gt;
  
   &lt;?php } ?&gt;
  </code></pre>
  
  <p>but, I still can not display the post data type of user id / author.
  anyone can help me?
  thanks in advance :)</p>