Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // prefix of meta keys, optional
- // use underscore (_) at the beginning to make keys hidden, for example $prefix = '_rw_';
- // you also can make prefix empty to disable it
- $prefix = 'faf_';
- $meta_boxes = array();
- // first meta box
- $meta_boxes[] = array(
- 'id' => 'faf',
- 'title' => 'Custom Food & Fitness Content',
- 'pages' => array('page'), // multiple post types, accept custom post types
- 'context' => 'normal', // normal, advanced, side (optional)
- 'priority' => 'high', // high, low (optional)
- 'fields' => array(
- array(
- 'name' => 'Author Byline',
- 'desc' => 'Enter author name',
- 'id' => $prefix . 'byline',
- 'type' => 'text' // text box
- ),
- array(
- 'name' => 'Author Bio',
- 'desc' => 'Enter author bio here',
- 'id' => $prefix . 'authorBio',
- 'type' => 'textarea' // text area
- )
- )
- );
- foreach ($meta_boxes as $meta_box) {
- $my_box = new RW_Meta_Box($meta_box);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement