Cannot add custom fields
-
Hi!
I’ve installed the plugin and edited the functions.php:function my_attachments( $attachments ) { $args = array( // title of the meta box (string) 'label' => 'My Attachments', // all post types to utilize (string|array) 'post_type' => array( 'post', 'page' ), // allowed file type(s) (array) (image|video|text|audio|application) 'filetype' => null, // no filetype limit // include a note within the meta box (string) 'note' => 'Attach files here!', // text for 'Attach' button (string) 'button_text' => __( 'Attach Files', 'attachments' ), // text for modal 'Attach' button (string) 'modal_text' => __( 'Attach', 'attachments' ), // fields for this instance (array) 'fields' => array( array( 'name' => 'title', // unique field name 'type' => 'text', // registered field type (field available in 3.0: text) 'label' => __( 'Title', 'attachments' ), // label to display ), array( 'name' => 'caption', // unique field name 'type' => 'text', // registered field type (field available in 3.0: text) 'label' => __( 'Caption', 'attachments' ), // label to display ), array( 'name' => 'group', // unique field name 'type' => 'text', // registered field type (field available in 3.0: text) 'label' => __( 'Group', 'attachments' ), // label to display ), ), ); $attachments->register( 'my_attachments', $args ); // unique instance name }But I still don’t see the “Group” field in “Edit Post”: screenshot
Thank you
M
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
The topic ‘Cannot add custom fields’ is closed to new replies.