# Gallery

With the Gallery field, create a new gallery of images by selecting existing images or uploading new ones with the WordPress uploader.

# Arguments

Name Type Default Description
type string gallery Value identifying the field type.

# Build Config

Build a Custom Configuration →
Changes you make to this form will be reflected in the generated code.
Field visibility requirements.

Redux::set_field( 'OPT_NAME', 'SECTION_ID', array(
    'type' => 'gallery'
) );

# Example Config

Redux::set_field( 'OPT_NAME', 'SECTION_ID', array(
    'id'       => 'opt-gallery',
    'type'     => 'gallery',
    'title'    => esc_html__('Add/Edit Gallery', 'your-textdomain-here'),
    'subtitle' => esc_html__('Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here'),
    'desc'     => esc_html__('This is the description field, again good for additional info.', 'your-textdomain-here'),
) );

# Example Usage

This example is 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'];