Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $meta_boxes[] = array(
- 'id' => 'C_meet_the_team',
- 'title' => '<img src="'.get_template_directory_uri().'/assets/metabox/img/academy-meet-the-team.png">',
- 'post_types' => array( 'academy' ),
- 'autosave' => false,
- 'context' => 'normal',
- 'priority' => 'high',
- 'revision' => true,
- 'storage_type' => 'custom_table', // Important
- 'table' => "{$db_prefix}academies", // Your custom table name
- 'fields' => array(
- array(
- 'name' => 'Meet the team',
- 'type' => "heading",
- ),
- // TEXT
- array(
- 'name' => 'Title',
- 'id' => "{$prefix}meet_the_team_title",
- 'type' => 'text',
- 'std' => 'Meet The [Academy] Team',
- 'readonly' => true,
- ),
- // GROUP
- array(
- 'id' => "{$prefix}meet_the_team_group",
- 'type' => 'group',
- 'clone' => true,
- 'sort_clone' => true,
- 'collapsible' => true,
- 'group_title' => array('field' => "{$prefix}team_name" ),
- 'add_button' => '+ Team Member',
- 'fields' => array(
- // IMAGE
- array(
- 'name' => 'Photo',
- 'id' => "{$prefix}team_photo",
- 'type' => 'image_upload',
- 'force_delete' => true,
- 'max_file_uploads' => 1,
- 'max_file_size' => '2mb',
- 'max_status' => true,
- 'image_size' => 'thumbnail',
- ),
- // TEXT
- array(
- 'name' => 'Name',
- 'id' => "{$prefix}team_name",
- 'placeholder' => 'Name Surname',
- 'type' => 'text',
- ),
- // TEXTAREA
- array(
- 'name' => 'About',
- 'desc' => 'Short description',
- 'id' => "{$prefix}team_about",
- 'type' => 'textarea',
- 'cols' => 20,
- 'rows' => 3,
- 'limit' => 140,
- 'limit_type' => 'character',
- ),
- ),
- ), // end Group
- ),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement