
The slidepress_display_gallery() WordPress template tag is intended to simplify the process of including a SlidePress gallery in a WordPress template.
slidepress_display_gallery($gallery_id, $feature, $echo, $alternate_content, $gallery_title, $gallery_image);
gallery_id (required): The ID of the gallery you want to insert.
feature (optional): Specifies whether you want to use extra feature such as 'thickbox' or 'lightview'. Default: NULL
echo (optional): Whether to echo or return the output. Default: TRUE
alternate_content (optional): If you want to override the default alternate content, use this argument (can be HTML code). Default: NULL
gallery_title (optional, for thickbox only): The title of the link to launch the thickbox window. Default: NULL
gallery_image (optional, for thickbox only): The image to be inserted in the link. Default: NULL
Simply insert the following template tag within any template and replace gallery-id with the ID of the gallery you want to display:
slidepress_display_gallery('gallery-id');
To use Thickbox or Lightview, you will need to specify a second parameter. If you pass NULL, the function will assume that you do not want to use Lightview or Thickbox:
slidepress_display_gallery('gallery-id', 'thickbox');
...or...
slidepress_display_gallery('gallery-id', 'lightview');
To use specific alternate content instead of the default alternate content in Setup panel, use the third parameter:
slidepress_display_gallery('gallery-id', '', '<p>Alternate Content</p>');
When using the Thickbox, you may want to specify two additional parameters which represent the title of the link (to launch the window) and an optional url for a image to be inserted in this link:
slidepress_display_gallery('gallery-id','thickbox', NULL, TRUE, 'My Thickbox Gallery','http://mydomain.com/images/gallery.png');
If you do not want the template tag to display the output of the gallery, but to return the HTML code, simply pass the forth parameter with a FALSE value:
slidepress_display_gallery('gallery-id', NULL, NULL, FALSE);