title: Get the value of a custom field of a WordPress post
body: <p>I have created one custom field in WordPress' edit post section, and am able to save the value by following this posts: <a href="https://stackoverflow.com/questions/5850901/wordpress-adding-custom-field-to-the-post-screen">Wordpress - Adding custom field to the post screen</a>.</p>
  
  <p>I'm able to retrieve the posts of the specific category, but I'm unable to retrieve the value of custom field.</p>
  
  <p><img src="https://i.stack.imgur.com/alQnI.jpg" alt="enter image description here"></p>
  
  <p>As seen in image above, there is a custom post field at highlighted at the top left. The other highlighted field is to show that the post belongs to the "Portfolio" category.</p>
  
  <p>Here is the code I used to retrieve the posts of the category "Portfolio"</p>
  
  <pre><code>&lt;?php 
      $the_query = new WP_Query(array(
      'category_name' =&gt; 'Portfolio', 
      'posts_per_page' =&gt; 9,
      'order' =&gt; 'DESC'
  )); 
  while ( $the_query-&gt;have_posts() ) : 
      $the_query-&gt;the_post();
  ?&gt;
  
  &lt;p&gt;The title: &lt;?php the_title(); ?&gt;&lt;/p&gt;
  &lt;p&gt; custome value: &lt;?php get_post_meta( $post_ID, '_ssb_portfolio_url', true); ?&gt; &lt;/p&gt;
  &lt;p&gt;The Content: &lt;?php the_content(); ?&gt;&lt;/p&gt;
  
  &lt;?php 
      endwhile; 
      wp_reset_postdata();
  ?&gt;
  </code></pre>
  
  <p>I'm able to get the value of the title of the post and the content of the post, but not custom field value. What wrong in my code?</p>