Forum Replies Created
Viewing 6 posts - 1 through 6 (of 6 total)
-
AuthorPosts
-
KwangGan
ParticipantThanks for reply this code generate from Meta box builder
July 18, 2018 at 7:32 PM in reply to: turn Mb Relationships as Field and make 1 to many relationships #10620KwangGan
Participantanyway I want to share my code to make Mb Relationships can select only single value
in
"inc/class-mb-relationships-relationship.php"search for function
"parse_meta_box_to"put these code under line
$field['name'] = $this->to['meta_box']['field_title'];like this
$field['name'] = $this->to['meta_box']['field_title']; $field['clone'] = $this->to['clone'];// <<< option to selective clone on/off $field['attributes']['required'] = $this->to['attributes']['required']; // set it required fieldnow we can use clone = false option
like this :
'to' => array( 'object_type' => 'post', 'post_type' => 'gallery', 'admin_column' => 'after title', // THIS! 'clone' => false, // <<<< add this line for turn off clone 'attributes' => array( // <<< for make field required 'required' => true, // <<< for make field required ), // <<< for make field required 'meta_box' => array( 'context' => 'normal', ), ),KwangGan
Participantyeah problem cause by metabox latest not mb front end
KwangGan
Participantany update ?
User both git version and wordpress version
mb front latest
Image still delete
KwangGan
Participantadd_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $meta_boxes[] = array ( 'id' => 'post-jobs', 'title' => 'post jobs', 'context' => 'normal', 'post_types' => 'jobclsf', 'priority' => 'high', 'fields' => array ( array( 'type' => 'image', 'name' => esc_html__( 'Thumbnail 1', 'rwmb-frontend-submission' ), 'id' => '_thumbnail_id', 'force_delete' => false, 'max_file_uploads' => 1, ), array( 'type' => 'image', 'name' => esc_html__( 'Thumbnail 2', 'rwmb-frontend-submission' ), 'id' => '_thumbnail_id_2', 'force_delete' => false, 'max_file_uploads' => 1, ), array( 'type' => 'image', 'name' => esc_html__( 'Thumbnail 3', 'rwmb-frontend-submission' ), 'id' => '_thumbnail_id_3', 'force_delete' => false, 'max_file_uploads' => 1, ), array ( 'id' => '_jobclsf_cate', 'type' => 'taxonomy', 'name' => 'ประเภทของงาน', 'taxonomy' => 'jobclsf_category', 'field_type' => 'select_tree', ), array ( 'id' => '_jobclsf_address', 'type' => 'text', 'name' => 'Title', 'placeholder' => 'กรุณากรอกพิกัด หรือ ที่อยู่', ), array ( 'id' => 'jobclsf_map', 'type' => 'map', 'name' => 'แผนที่ปฏิบัติงาน', 'address_field' => '_jobclsf_address', ), ), ); return $meta_boxes; }November 15, 2017 at 11:22 PM in reply to: ✅I can't get FIX Patch update cause my licence is already expired #7402KwangGan
ParticipantIt's a bit unfair for people when some issue is consider as BUG and people who bought it can't get update or any guide to make extension work like it mention. at least you should release guide to fix this issue for older version.
or keep selling BUG extension to people that support you.
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)