# Gallery
With the Gallery field, create a new gallery of images by selecting existing images or uploading new ones with the WordPress uploader.
Table of Contents
# Arguments
Name | Type | Default | Description |
---|---|---|---|
type | string | gallery | Value identifying the field type. |
Also See
# Build Config
Build a Custom Configuration →
Changes you make to this form will be reflected in the generated code.
Redux::set_field( 'OPT_NAME', 'SECTION_ID', array(
'type' => 'gallery'
) );
# Example Config
Redux::addField( 'OPT_NAME', 'SECTION_ID', array(
'id' => 'opt-gallery',
'type' => 'gallery',
'title' => __('Add/Edit Gallery', 'redux-framework-demo'),
'subtitle' => __('Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'redux-framework-demo'),
'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
) );
# Example Usage
This example in based on the example usage provided above. Be sure to change $redux_demo
to the value you specified in your opt_name argument.
The gallery field returns a comma separated value of the attachment IDs of the selected images.
global $redux_demo;
echo '' . $redux_demo['opt-gallery'];
← Editor Image Select →