Actions

Difference between revisions of "Gallery shortcode"

From Unusual Light Wiki

 
Line 1: Line 1:
The '''[gallery]''' shortcode or '''[better_gallery]''' is what is used to generate galleries on posts and pages.
+
The '''[gallery]''' is what is used to generate galleries on posts and pages.
  
If you are using the gallery post type, then this is automatically included.
+
You should add this to the post/page content area to ensure a gallery is included in your content.
  
 +
If you are using the gallery post type, then this is automatically included and you will not need to add it to the content area.
  
In addition to using the form to supply which theme you are using and whether to display captions etc, you can also supply options via the tag:
 
  
 +
In addition to shortcode you may need to set the gallery settings using the gallery manager form.
  
Here's a few explained.
+
Here you can set the gallery template that will be used to display your images, control whether thumbnails will be visible, whether images will automatically resize to the screen size and whether to display captions etc.
  
'''[better_gallery template=single random=true ]'''
+
 
 +
 
 +
Here's a few examples.
 +
 
 +
'''Template: Single & Random: True'''
 
This one’s nice and simple. It’s going to pull out a random single image. Super useful for homepages or maybe an about, contact or even an error page.
 
This one’s nice and simple. It’s going to pull out a random single image. Super useful for homepages or maybe an about, contact or even an error page.
  
'''[better_gallery template=autoslideshow ]'''
+
'''Template: autoslideshow'''
 
Another cracker for your homepage needs. This one’s is an automatic slideshow of every image you’ve added to the page. And you can throw in the random tag if your that way inclined.
 
Another cracker for your homepage needs. This one’s is an automatic slideshow of every image you’ve added to the page. And you can throw in the random tag if your that way inclined.
  
 
[[Category:Gallery_shortcode]]
 
[[Category:Gallery_shortcode]]
 
[[Category:shortcodes]]
 
[[Category:shortcodes]]

Latest revision as of 11:15, 26 July 2014

The [gallery] is what is used to generate galleries on posts and pages.

You should add this to the post/page content area to ensure a gallery is included in your content.

If you are using the gallery post type, then this is automatically included and you will not need to add it to the content area.


In addition to shortcode you may need to set the gallery settings using the gallery manager form.

Here you can set the gallery template that will be used to display your images, control whether thumbnails will be visible, whether images will automatically resize to the screen size and whether to display captions etc.


Here's a few examples.

Template: Single & Random: True This one’s nice and simple. It’s going to pull out a random single image. Super useful for homepages or maybe an about, contact or even an error page.

Template: autoslideshow Another cracker for your homepage needs. This one’s is an automatic slideshow of every image you’ve added to the page. And you can throw in the random tag if your that way inclined.