Add Media Upload Box

This code adds a new meta box which works in the same way as the existing Add Media button above your editor.

The code works in Genesis and any other WordPress theme.

1. You can upload any media type including image files, videos & PDF’s.

Or

2. Choose from existing media files already uploaded to your WordPress media library.

After you include the file in your genesis child theme, you’ll find a new box with Add Media button below your editor like this.

add-media-button

Click to Enlarge Image – You can then click the Add Media button to add or upload a media file:

upload-media

Code Installation

There’s 2 simple steps:

After you download the zip file below:

  1. Upload the folder named uploader to your child themes root directory.
  2. Add the following PHP code to your child themes functions file.
  3. include_once( get_stylesheet_directory() . '/uploader/uploader.php' );

Simple as that!

Display Box in Sidebar

You can also choose to display the upload field in your sidebar rather than below the editor:

upload-files

Modification – PHP Code Support

Members can request PHP code modification or edit the code themselves as there’s only a small amount of PHP code in 1 file to modify.

Usage

Once you add a new media file or choose one from your Media Library, you can then output the file anywhere. You’ll find dozens of code here on wpsites.net which enables you to use the Media box for:

  • Adding different header images on any post or page.
  • Inserting a 2nd featured image which is different to the default.
  • Adding PDF’s & Video’s for download or viewing.

Here’s the folder for logged in members:

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.