Add meta boxes

To add custom meta boxes for your custom fields is a great way to simplify the user interface in WordPress.

Adding your own hasn’t been very easy for someone without very much php experience, but using Deluxe Blog Tips Meta box script makes it a whole lot easier.

Download it, and include it using the instructions on their website.

Code Snippet:

$meta_boxes&#91;&#93; = array(
    'id' => 'personal',                            // meta box id, unique per meta box
    'title' => 'Personal Information',            // meta box title
    'pages' => array('post', 'page', 'album'),    // post types, accept custom post types as well, default is array('post'); optional
    'context' => 'normal',                        // where the meta box appear: normal (default), advanced, side; optional
    'priority' => 'high',                        // order of meta box: high (default), low; optional

    'fields' => array(                            // list of meta fields
            'name' => 'Full name',                    // field name
            'desc' => 'Format: Firstname Lastname',    // field description, optional
            'id' => $prefix . 'fname',                // field id, i.e. the meta key
            'type' => 'text',                        // text box
            'std' => 'Anh Tran',                    // default value, optional
            'validate_func' => 'check_name'            // validate function, created below, inside RW_Meta_Box_Validate class

// Add as many as you want by copy the arrays and naming them $meta_boxes[1], $meta_boxes[2] etc.

foreach ($meta_boxes as $meta_box) {
    new RW_Meta_Box($meta_box);

Posted in Admin area