[gallery]
The WordPress [gallery] shortcode allows you to display image galleries on your pages and posts (Gallery Shortcode WordPress Codex).
In the Dottoro theme, there is a similar shortcode, the [gallery_list] shortcode.
The main difference between the [gallery] and [gallery_list] shortcodes is that the [gallery] shortcode displays WordPress galleries while the [gallery_list] shortcode displays Dottoro galleries.
Additionally, the [gallery_list] shortcode provides much more options than the [gallery] shortcode (more on Dottoro Galleries and the [gallery_list] shortcode).
To make the WordPress [gallery] shortcode more flexible, we have extended its features in the Dottoro theme as described in the following table.
Additional Attributes: | |
---|---|
dottoro_overlay |
Specifies the identifier of the overlay to appear over the images. Default is 'dottoro_gallery'.
To get the identifier of an overlay, go to Templates » Overlays and click on the overlay. Here you will find the id of the overlay. If you don't need any overlay, set this attribute to an empty string. More on Overlays. |
dottoro_frame | Specifies whether to show a frame around the images, or not (true | false) |
dottoro_gallery_popup |
In Dottoro Theme, clicking the gallery images will open a popup slideshow displaying the images in an attractive manner.
With the dottoro_gallery_popup attribute, you can specify the identifier of the gallery popup that should be used.
If the dottoro_gallery_popup attribute is not specified, the "Gallery Popup" setting of the page/post determines it (see Gallery Popup option under Theme Options » General for details).
To get the identifier of a gallery popup, go to Popups » Gallery Popups and click on the popup. Here you will find the id of the popup. For further details, please see Popup Slideshows. |
[dottoro_gallery]
The WordPress gallery is not identical to the Dottoro Gallery. In the Dottoro Theme, you can create multiple galleries for every post and page (see Gallery Settings).
You can make a gallery available to your users in more ways (read more in the Galleries section). One way is using the [dottoro_gallery] shortcode. It allows you to display any HTML content that opens a gallery or galleries in a popup slideshow.
Attributes: | |
---|---|
add_to_gallery |
The function has been removed in version 1.42
Boolean that sets whether the media set with the href attribute should added to the gallery or not.
|
align |
The horizontal alignment of the shortcode content ( left | center | right | empty string ). Default is an empty string.
If the 'for' is specified (and the 'value' is not), this attribute is omitted. |
for |
The identifier of the HTML element that should open the popup slideshow when the user clicks on it.
If this attribute is specified the content of the dottoro_gallery shortcode will be omitted. If the value attribute is specified both the for attribute and the shortcode's content are omitted. |
group |
Specifies a gallery identifier or a comma separated list of gallery identifiers.
|
height | If the dottoro_gallery shortcode adds a media to a gallery (see href attribute), then this attribute allows you to specify the height of the media in the popup slideshow. This is mostly useful for flash and video. |
href |
This attribute has two functions:
|
overlay |
The identifier of the overlay that should appear over the content of the shortcode.
To get the identifier of an overlay, go to Templates » Overlays and click on the overlay. Here you will find the id of the overlay. If the overlay attribute is not specified, no overlay will appear unless the deprecated show_hoverelem attribute is set to true. In this case, the built-in overlay 'Gallery' will be used. Please note that if the 'for' attribute is specified, the overlay attribute will be omitted and no overlay will appear. More on Overlays. |
show_frame | Boolean that sets whether to show a frame around the content of the shortcode. This attribute has effect only if the shortcode has content (and if the 'value' and 'for' attributes are not specified). |
show_hoverelem |
This attribute is deprecated from version 1.29. Use the overlay attribute instead.
Boolean that sets whether to show the magnifier over the content of the shortcode. (default: false)
|
value |
Sets the text of the link that opens the popup slideshow.
If this attribute is specified both the 'for' attribute and the shortcode's content are omitted. |
width | If the dottoro_gallery shortcode adds a media to a gallery (see href attribute), then this attribute allows you to specify the width of the media in the popup slideshow. This is mostly useful for flash and video media. |
This example shows how to create a link that opens the gallery of the current page (that can be managed under Gallery Settings on the Edit Page/Post screen):
[dottoro_gallery value="Show the gallery"/]
This example is the same as the previous one, but it also adds an image to the gallery. Clicking on the link opens a popup slideshow that will start with this image.
[dottoro_gallery value="Show the gallery" href="http://www.example.com/myimage.jpg"/]
This example displays an image that opens the gallery.
[dottoro_gallery]<img src="IMAGE_URL" width="300" height="300" />[/dottoro_gallery]
This example displays a heading element that opens the gallery.
[dottoro_gallery for="example"/]
<h1 id="example">Show the gallery</h1>
This example defines two different galleries (fruits, friends) on the same page. The fruits gallery contains three, the friends gallery two images. Clicking on the 'Show Fruits' link opens the fruits gallery, clicking on the 'jennifer' image opens the friends gallery.
[dottoro_gallery group="fruits" href="http://www.example.com/banana.jpg"/]
[dottoro_gallery group="fruits" href="http://www.example.com/pear.jpg" value="Show Fruits"/]
[dottoro_gallery group="fruits" href="http://www.example.com/peach.jpg"/]
[dottoro_gallery group="friends" href="http://www.example.com/peter.jpg"/]
[dottoro_gallery group="friends" for="img_jen" href="http://www.example.com/jennifer.jpg"/]
<img id="img_jen" src=" http://www.example.com/jennifer.jpg"/>
For further details, please see the Galleries section.