title: wordpress get_post_meta not working in loop
body: <p>I am trying to get posts on a page ordered by custom field "price" I have done the ordering but now I cannot get the value of 'price' echoed. The get_post_meta does not give any output. Here is the code:</p>
  
  <pre><code>$args=array(
  'meta_key'=&gt;'price',
  'post_type' =&gt; 'page',
    'orderby'=&gt;'meta_value_num',
    'post_status' =&gt; 'publish',
    'posts_per_page' =&gt; -1,
    'caller_get_posts'=&gt; 1
  
  );
  $my_query = null;
  $my_query = new WP_Query($args);
  if( $my_query-&gt;have_posts() ) {
   $count=0;
    while ($count&lt;4 &amp;&amp; $my_query-&gt;have_posts()) : $my_query-&gt;the_post(); ?&gt;
  
      &lt;td&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;
      &lt;img alt="product" src="/product-images/image.jpg" height="100px" width="75px"/&gt;
      &lt;p&gt;&lt;?php the_title(); ?&gt;&lt;/p&gt;
      &lt;?php echo get_post_meta($my_query-&gt;ID, 'price', true); ?&gt;
      &lt;/a&gt;
      &lt;/td&gt;
      &lt;?php
      $count++;
    endwhile;
  }
  wp_reset_query();  // Restore global post data stomped by the_post().
  ?&gt;
  </code></pre>