title: Wordpress - Retrieving specific posts from the current user
body: <p>I have a custom post with 2 fields, the first field being the user, and the second one being a table, and whenever a user is logged in, I must display all of the posts that have the user in the 1st field, this is what I found:</p>
  
  <p>In <strong>wp_user</strong> the ID of the user I'll be using to test it will have: <strong>user_id = 3</strong></p>
  
  <p>In <strong>wp_postmeta</strong>, I have a row with these values:</p>
  
  <p><strong>-post_id=92
  -meta_value=3</strong></p>
  
  <p>And in <strong>wp_posts</strong>, in the <strong>ID = 92</strong>, I have the specific post name I was looking for.</p>
  
  <p>I'm pretty confused on how to make this code dynamically, so any user will be able to see their own posts. <strong>And BTW, the post_author is the admin, so I can't use that field</strong></p>
  
  <p>Basiclly, I must retrieve the post_id from wp_postmeta by only using the the meta_value which I've seen a couple of guides but can't really understand how to do it. I know I must use wp_get_current_user(). Please someone explain me with detail how to achieve this.</p>
  
  <p>Thanks</p>