title: Display metabox values in Wordpress
body: <p>I'm trying to add metabox with date in Wordpress. I used code from <a href="http://wpsnipp.com/index.php/functions-php/start-date-end-date-metabox-for-events-custom-post-types/" rel="nofollow">this page</a>. It works well, but I have a problem displaying the metabox values on page.</p>
  
  <p>My loop:</p>
  
  <pre><code>&lt;?php query_posts(array('post_type' =&gt; 'event' , 'posts_per_page' =&gt; 9999, 'orderby' =&gt; 'menu_order', 'order' =&gt; 'ASC' ));
  if (have_posts()) : while (have_posts()) : the_post();
  $custom = get_post_custom($post-&gt;ID); ?&gt;
  
  &lt;div class="event"&gt;
      &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
      &lt;p&gt;Date: &lt;?php echo get_post_meta($post-&gt;ID, '_day', true);?&gt;.&lt;?php echo get_post_meta($post-&gt;ID, '_month', true);?&gt;.&lt;?php echo get_post_meta($post-&gt;ID, '_year', true);?&gt;&lt;/p&gt;
      &lt;p&gt;Hour: &lt;?php echo get_post_meta($post-&gt;ID, '_hour', true);?&gt;:&lt;?php echo get_post_meta($post-&gt;ID, '_minute', true);?&gt;&lt;/p&gt;
      &lt;?php the_content(''); ?&gt;
  &lt;/div&gt;
  &lt;?php endwhile; endif; ?&gt;
  </code></pre>
  
  <p>I added custom post type 'event'. Values in metabox(date/location) have been saved, but it haven't displayed on page.</p>
  
  <p>Why it doesn't work?</p>