Hi guys I'm working with woocommerce and I would like to know how I can do so that when uploading a product and want to add multiple images to the gallery do not have to press ctrl if you can just click.
I have found this here but I do not know where to add that code to make it work.
if($(this).hasClass('multiple-image-button')) {
// Set the wp.media attributes
var send_attachment_multiple = wp.media({
title : 'Choose or Upload an Image',
multiple: 'add',
library: {
type: [ 'image' ]
},
});
} else {
//uploadSingleImages(this);
// Set the wp.media attributes
var send_attachment_multiple = wp.media({
title : 'Choose or Upload an Image',
multiple: false,
library: {
type: [ 'image' ]
},
});
}
thank you very much for your help
To add multiple image in gallery by wp.media, then
You have to make the multiple as true for selecting multiple images