title: create custom field and upload image in wordpress
body: <p>i'm trying to learn the way for uploading image file through custom field but cant get the easiest code to do it. i just done a bit here:</p>
  
  <pre><code>add_action('admin_init', 'create_image_box');
  function create_image_box() {
  add_meta_box( 'meta-box-id', 'Image Field', 'display_image_box', 'post', 'normal', 'high' );
  }
  
  //Display the image_box
  function display_image_box() {
   global $post;
    $image_id = get_post_meta($post-&gt;ID,'xxxx_image', true);
   echo 'Upload an image: &lt;input type="file" name="xxxx_image" id="xxxx_image" /&gt;';
  
  // Upload done: show it now...(as thmbnail or 60 x 50) 
  </code></pre>
  
  <p>anybody please take me to next step and show the way to display the image in blog page too.</p>