[simple_gallery]

The shortcode displays a gallery of images in various layouts, such as grid or carousel, with customizable options.


Product


Shortcode Attributes

There are a number of shortcode attributes available which you can use to customize the output.

GENERAL LAYOUT

  1. listing_only – Determines whether to display only the gallery listing.
    • Default: on.
    • Options: on, off. Specify one only.
  2. layout – The layout type for the gallery.
    • Default: grid.
    • Options: grid, carousel. Specify one only.
  3. per_row – The number of items to display per row (for grid layout).
    • Default: 3.
    • Options: 16. Specify one only.

Grid Layout

  1. grid_layout – The grid layout style to use.
    • Default: default-grid-layout.
    • Options: default-grid-layout, grid-layout-1, grid-layout-2, grid-layout-3, masonry-layout-1. Specify one only.

Carousel Layout

  1. carousel_layout – The carousel layout style to use.
    • Default: default-carousel-layout.
  2. autoplay – Enables or disables autoplay for the carousel.
    • Default: off.
    • Options: on, off. Specify one only.
  3. slider_speed – The speed of the carousel autoplay (in seconds).
    • Default: 6.
    • Options: Any numeric value.
  4. slider_arrow – Enables or disables navigation arrows for the carousel.
    • Default: on.
    • Options: on, off. Specify one only.
  5. slider_dots – Enables or disables pagination dots for the carousel.
    • Default: on.
    • Options: on, off. Specify one only.

CONTENT

  1. lightbox – Enables lightbox functionality for images.
    • Default: off.
    • Options: on, off. Specify one only
  2. id – The ID of the gallery post type from which to retrieve the gallery images.
    • Options: Any numeric value. Specify one only.

Example Usage

[simple_gallery id="123" layout="grid" per_row="4"]
[simple_gallery id="123" layout="carousel" autoplay="on" slider_speed="5"]
[simple_gallery id="123" layout="grid" lightbox="on"]

Results

Example 1:
This example display a gallery in a grid layout with 4 images per row.

Example 2:
This example display a gallery in a carousel layout with autoplay enabled.

Example 3:
This example display a gallery in a grid layout with a lightbox enabled.
Ensure the id attribute corresponds to a valid gallery post type and that the post has gallery images assigned.