Image advanced field not working
-
Hi there, I’m using Meta Box to create two image fields, one for a company logo and the other for up to three product images. The fields are displaying correctly in the backend, but when I click on the “select or upload image” button the browser just jumps to the top of the screen. It looks like some JavaScript isn’t firing, but I don’t see any console errors. Here’s my code that I’m using to generate the meta boxes:
add_filter( 'rwmb_meta_boxes', 'ca_register_meta_boxes' ); function ca_register_meta_boxes( $meta_boxes ) { $prefix = 'rw_'; $meta_boxes[] = array( 'id' => 'images', 'title' => 'Member images', 'pages' => array( 'Member' ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => 'Company logo', 'desc' => 'Upload the company logo for use in the list of members', 'id' => $prefix . 'logo', 'type' => 'image_advanced', 'max_file_uploads' => 1, ), array( 'name' => 'Product images', 'desc' => 'Upload up to three images to display on the member profile page', 'id' => $prefix . 'product_images', 'type' => 'image_advanced', 'max_file_uploads' => 3, ), ) ); return $meta_boxes; }
Any ideas on how to fix or debug this?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Image advanced field not working’ is closed to new replies.