A simple WP plugin that adds a meta box in your post admin to allow upload the header image for your post or pages.

Installation

  1. Download the Header Image Uploader Plugin.
  2. In your WordPress Administration, go to Plugins > Add New > Upload, and select the plugin ZIP file.
  3. Activate the plugin.
  4. Done! The image uploader meta box will appear on add/edit post/page.

Printing the image output is very simple. Just use this code in your template file.


<?php /*$image = get_post_meta(get_the_ID(), '$key', true); */
$id = get_post_meta($post->ID, 'imhy', true);
$image = wp_get_attachment_image_src($id, 'full-size');
?>
<img src="<?php echo $image[0]; ?>" />