RW Meta Box Class WordPress Plugin | Web Development Services by Ed Nailor

RW Meta Box Class WordPress Plugin

Print Friendly

Introducing The RW Meta Box Class plugin for WordPress

This plugin uses the Meta Box class as created by Rilwis and adds the capabilities to WordPress as a plugin.

UPDATE: The author of this script has released this as an updated WordPress plugin. I highly recommend you use this version of the plugin: Meta Box on WordPress.org

What is the Meta Box Class?

Rilwis created a great bit of code that allows developers to quickly and easily add custom meta boxes for all post types (pages, posts, custom). The way Rilwis set this up, you simply copy his code to your theme’s functions.php file and then set up the boxes. The setup is fairly straight forward for any level of developer as long as you read the documentation.

The script includes awesome features beyond just adding a text input box. This also taps into the built in WordPress file upload system to allow users to upload images and files to a custom meta box, includes an HTML editor for the custom meta box and much more.

Why a Plugin?

There are a couple problems with simply adding the script to a theme’s functions.php file:

  • When a user switches themes, the meta boxes disappear.
  • When using child themes, the class is not activated at the child theme level, so adding meta boxes must be done at the parent theme level ( a no-no when using child themes ).

With the plugin, the script is loaded before the themes functions.php files are activated, so the class if available at both the parent and the child theme level. This also allows the script to be more portable between themes (although the new theme must support any custom post types from the old theme.)

Installation

  • Upload ‘rw-meta-box-class’ folder to the ‘/wp-content/plugins/’ directory
  • Activate the plugin through the ‘Plugins’ menu in WordPress
  • Create your own Meta Box Use code (see notes on Creating Meta Box Code).

Creating Meta Box Code

  • Using the included meta-box-usage-sample.php file as a guide, create your own and place code in functions.php file.
  • If using a child theme, you can place this code in the child theme’s functions.php file.
  • Be sure to surround your code with the following:

For full details on the RW Meta Box Class, view full documentation at http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html

Download

UPDATE: The author of this script has released this as an updated WordPress plugin. I highly recommend you use this version of the plugin: Meta Box on WordPress.org



Comments are closed.