"image-select" – selected thumbnail on the front
-
How to make the selected picture showed is also on the front?
so I changed the code<?php add_filter( 'rwmb_meta_boxes', 'prefix_register_meta_box_image_select' ); function prefix_register_meta_box_image_select( $meta_boxes ) { $meta_boxes[] = array( 'title' => __( 'Image Select Demo', 'meta-box', 'meta-box' ), 'fields' => array( array( 'id' => 'layout', 'name' => __( 'Layout', 'meta-box' ), 'type' => 'image_select', 'multiple' => true, // Array of 'value' => 'Image Source' pairs 'options' => array( 'https://placehold.it/90x90&text=Left' => 'https://placehold.it/90x90&text=Left', 'https://placehold.it/90x90&text=Right' => 'https://placehold.it/90x90&text=Right', 'https://placehold.it/90x90&text=None' => 'https://placehold.it/90x90&text=None', 'https://placehold.it/90x90&text=One' => 'https://placehold.it/90x90&text=One', ), // Allow to select multiple values? Default is false // 'multiple' => true, ), ), ); return $meta_boxes; }
but after saving, the result is not stored.
Do you have any ideas?
Thank you for your help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘"image-select" – selected thumbnail on the front’ is closed to new replies.