Soliloquy Documentation

Documentation, Reference Materials, and Tutorials for Soliloquy

Dynamic Addon

The Dynamic Addon for Soliloquy is a premium Addon that allows you to create Soliloquy-based sliders on the fly via shortcode or template tag. It gives you the freedom to generate sliders incredibly fast without the need of the back-end interface of Soliloquy.

It utilizes the same processing engine and HTML output to deliver your sliders, so you get the same incredible speed, performance and customization with the added bonus of doing it on the fly – hence dynamic.

Required:
This Addon is available with a Developer or Master license.

The Dynamic Addon can be used to create sliders from images in a number of different scenarios. In this guide we provide several examples, and details on specific parameters you can use to get started adding dynamic sliders throughout your site.

 


Installation

You will first need to install and activate the Dynamic Addon.


Setup

Once the Addon has been installed and activated, there will be a new gallery item named Soliloquy Dynamic Slider. This is used to define the default, global settings which are then used by any Soliloquy Dynamic Slider instance.

The settings configured for the Soliloquy Dynamic Slider only apply to Dynamic Sliders (that is, sliders created using the Dynamic shortcode or template tag).

Once you install and activate the Dynamic Addon, you'll see a new item in the slider list which you can configure defaults for all of your dynamic sliders.

For details on the available settings, please see our Configuring Your Slider documentation, which includes a breakdown of all available configuration options.


Outputting a Dynamic Slider

There are two methods available to output a Soliloquy Dynamic Slider:

  • shortcode
  • template tag

Shortcode

The shortcode output is typically used within a Visual or Text Editor on your WordPress Page, Post or Custom Post Type’s edit screen, and is:

[soliloquy_dynamic]

Template Tag

The template tag output is typically used within your WordPress Theme’s PHP code or template file, and is:

soliloquy_dynamic();

Shortcodes and template tags accept a number of configuration options (or arguments) to customize the output of the gallery.


Examples

Output the Current Page/Post/CPT’s attached images

Shortcode:

[soliloquy_dynamic id="123"]

Template Tag:

soliloquy_dynamic( array( 'id' => 123 ) );

Notes:

  1. Replace '123' with your Page/Post/CPT’s ID.

Output specific images in the WordPress Media Library

Shortcode:

[soliloquy_dynamic id="custom-XXX" images="600,601,602"]

Template Tag:

soliloquy_dynamic( array( 'id' => 'custom-XXX', 'images' => '601,602,603' ) );

Notes:

  1. Replace 'XXX' with a unique name (this can be anything).
  2. Set the 'images' parameter to be a comma-separated list of Media Library attachment IDs.

Output specific images by URL

Shortcode:

[soliloquy_dynamic id="custom-XXX" images="http://placehold.it/600x300,http://placehold.it/500x300"]

Template Tag:

soliloquy_dynamic( array( 'id' => 'custom-XXX', 'images' => 'http://placehold.it/600x300,http://placehold.it/500x300' ) );

Notes:

  1. Replace 'XXX' with a unique name (this can be anything).
  2. Set the 'images' parameter to be a comma-separated list of image URLs.

Output all images from a folder in the WordPress Content Directory

Shortcode:

[soliloquy_dynamic id="folder-slider"]

Template Tag:

soliloquy_dynamic( array( 'id' => 'folder-slider' ) );

Notes:

  1. The folder name begins after folder-; in the example above you would need a folder called slider inside your wp-content folder.
  2. Folder must be directly within the wp-content directory e.g. wp-content/slider. Subdirectories (wp-content/slider/slider) will not work.
  3. Files within the folder must not contain spaces. For best compatibility, stick to alphanumeric characters.
  4. JPG, JPEG, PNG and GIF images are supported.
  5. Performance may be slower than adding your images to a Soliloquy Slider — this should only be used for a small number of images.

Overriding the default WordPress gallery output with a Soliloquy slider

Shortcode:

[gallery ids="123,1234,12345,123456" soliloquy="true"]

Template Tag:

The WordPress Gallery feature doesn’t provide a pure template tag option, however you can still use it within your PHP files using do_shortcode(); as recommended by WordPress’s documentation:

echo do_shortcode('[gallery ids="123,1234,12345,123456" soliloquy="true"]');

Passing Custom Arguments

You can also pass in custom arguments using soliloquy_args. These arguments will override your defaults that you specify in the Soliloquy Dynamic Slider item’s settings. The arguments should be passed in the form of a query string like this:

[gallery ids="123,1234,12345,123456" soliloquy="true" soliloquy_args="width=400&height=200&random=true"]

Notes:

  1. Learn more about available arguments in our Configuring Your Slider documentation

Slider from your NextGEN galleries

Shortcode:

[soliloquy_dynamic id="nextgen-2"]

Template Tag:

soliloquy_dynamic( array( 'id' => 'nextgen-2' ) );

Notes:

  1. Replace 2 with the ID of the specific NextGEN gallery you want to populate the dynamic slider from.

Slider from your Envira galleries

Shortcode:

[soliloquy_dynamic id="envira-2"]

Template Tag:

soliloquy_dynamic( array( 'id' => 'envira-2' ) );

Notes:

  1. Replace 2 with the ID of the specific Envira gallery you want to populate the dynamic slider from.

Configuration Parameters

The configuration parameters available to each slider you create dynamically are listed below for your convenience. In all instances the id parameter is required.

id

This parameter is required.

images

Optional, this parameter is only used in conjunction with creating a slider from a custom set of images. It is ignored for any other dynamic slider.

The images parameter should contain a comma-separated string of image IDs from your media library, or a comma-separated string of image URLs.

The slider images will appear in the order specified unless the slider is configured to randomize the slide order.

links

Optional, this parameter is only used in conjunction with creating a slider from a custom set of images. It is ignored for any other dynamic slider.

The links parameter should contain a comma-separated string of URLs which correspond to each of the image IDs specified in your dynamic slider’s shortcode or template tag.

Shortcode:
[soliloquy_dynamic id="custom-XXX" images="123,1234" links="http://google.com,http://soliloquywp.com"]

Template Tag:
soliloquy_dynamic( array( 'id' => 'custom-XXX', 'images' => '123,1234', 'links' => 'http://google.com,http://soliloquywp.com' ) )

default

Optional, this parameter is used to specify the default configuration the dynamic slider should use, if it should be anything other than the Dynamic Slider configuration set.

The default parameter should contain the ID of the slider whose configuration should be used.

Shortcode:
[soliloquy_dynamic id="custom-XXX" images="2999,2984,2983,2982" default="2996"]

Template Tag:
soliloquy_dynamic( array( 'id' => 'custom-XXX', 'images' => '2999,2984,2983,2982', 'default' => '2996' ) );

captions

Optional, this parameter is used only in conjuction with creating a slider from a custom set of images, to define the captions that should appear for each image. It is ignored for any other dynamic slider.

The captions parameter should contain a comma-separated string of captions which correspond to each of the image IDs or URLs specified in your dynamic slider’s shortcode or template tag.

Shortcode:
[soliloquy_dynamic id="custom-XXX" images="2999,2984,2983,2982" captions="testing,testing2,testing3"]

Template Tag:
soliloquy_dynamic( array( 'id' => 'custom-XXX', 'images' => '2999,2984,2983,2982', 'captions' => 'testing,testing2,testing3' ) );

exclude

Optional, this parameter is only used in conjunction with creating a slider from a specific Post/Page/CPT’s attached images. It is ignored for any other dynamic slider.

The exclude parameter should contain a comma-separated string of image IDs that should be excluded from the slider.

Shortcode:
[soliloquy_dynamic id="123" exclude="987,9876"]

Template Tag:
soliloquy_dynamic( array( 'id' => '123', 'exclude' => '987,9876' ) );


Thumbnail Support

Note: The following is relevant only if you’re using the Thumbnails Addon.

You can add support for thumbnails with the following additional parameters, available when you have the Thumbnails Addon installed and activated on your site.

thumbnails

This option enabled or disables thumbnails for the slider.

Shortcode:
[soliloquy_dynamic id="253" thumbnails="true"]

Template Tag:
soliloquy_dynamic( array( 'id' => '253', 'thumbnails' => 'true' ) )

thumbnails_crop

You can choose to crop your thumbnails to specific dimensions you specify.

Shortcode:
[soliloquy_dynamic id="253" thumbnails_crop="true"]

Template Tag: soliloquy_dynamic( array( 'id' => '253', 'thumbnails_crop' => 'true' ) )

thumbnails_width

Sets the width of each thumbnail for the slider.

Shortcode:
[soliloquy_dynamic id="253" thumbnails_width="125"]

Template Tag:
soliloquy_dynamic( array( 'id' => '253', 'thumbnails_width' => '125' ) )

thumbnails_height

Sets the height of each thumbnail for the slider (only used in if the thumbnails_crop setting is set to true).

Shortcode:
[soliloquy_dynamic id="253" thumbnails_height="75"]

Template Tag: soliloquy_dynamic( array( 'id' => '253', 'thumbnails_height' => '75' ) )

thumbnails_margin

The margin between each thumbnail.

Shortcode:
[soliloquy_dynamic id="253" thumbnails_margin="8"]

Template Tag:
soliloquy_dynamic( array( 'id' => '253', 'thumbnails_margin' => '8' ) )

thumbnails_min

The minimum number of thumbnails that should be displayed.

Shortcode:
[soliloquy_dynamic id="253" thumbnails_min="2"]

Template Tag:
soliloquy_dynamic( array( 'id' => '253', 'thumbnails_min' => '2' ) )

thumbnails_max

The maxmimum number of thumbnails that should be displayed.

Shortcode:
[soliloquy_dynamic id="253" thumbnails_max="2"]

Template Tag:
soliloquy_dynamic( array( 'id' => '253', 'thumbnails_max' => '2' ) )

thumbnails_position

The position of the thumbnails relative to the slider. Possible values are “top” and “bottom”.

Shortcode:
[soliloquy_dynamic id="253" thumbnails_position="top"]

Template Tag:
soliloquy_dynamic( array( 'id' => '253', 'thumbnails_position' => 'top' ) )

thumbnails_distance

The padding between the thumbnails container and the slider.

Shortcode:
[soliloquy_dynamic id="253" thumbnails_distance="15"]

Template Tag:
soliloquy_dynamic( array( 'id' => '253', 'thumbnails_distance' => '15' ) )


Troubleshooting

Dynamic Slider Captions

The images you show in your Dynamic sliders can display a caption if you’ve defined the caption field for your image(s) in the Media Library.

Enter text in the Caption field for your image to populate the caption for Dynamic Sliders.


Template Tags

If you’re using Template Tags, we recommend that you take care to check that the soliloquy_dynamic function exists before outputting it in your template files, just like the code does with the regular soliloquy function. It would be output like so:

if ( function_exists( 'soliloquy_dynamic' ) ) soliloquy_dynamic( array( 'id' => '176' ) );

Be sure to wrap it in beginning and ending PHP tags if necessary.


Changelog

2.3.2 (2016-08-31)

  • Added: default tag to use options from other sliders
  • Added: Captions for attachment id using the caption="my caption"
  • Fix: Multisite

2.3.1 (2016-07-07)

  • Fix: Saving the Dynamic Slider causing sliders to not display

2.3.0 (2016-06-21)

  • UI Refresh

2.2.6 (2016-02-23)

  • Added: fr_FR Translations

2.2.5 (2015-10-22)

  • Added: links shortcode / function parameter, which accepts a comma separated list of image links to correspond to the comma separated list of image IDs

2.2.4 (2015-07-30)

  • Added: Support for remote image URLs

2.2.3 (2015-07-16)

  • Added: Support for images in folder within wp-content directory

2.2.2

  • Fix: NextGen 2.1.x+ compatibility

2.2.1

  • Fix: ID not set on some Dynamic Sliders due to soliloquy_dynamic_queried_data filter
  • Fix: Some users received 2.2.0, so this ensures they do not miss this update.

2.1.9.1

  • Fixed bug with 2.1.9 release and sliders not working.

2.1.9

  • Added: Return on soliloquy_dynamic() function when $return is enabled
  • Added: Refactored Filters to allow other Addons to add additional Dynamic Slider support

2.1.8

  • Added: Support for Envira Galleries

2.1.7

  • Added: Link parameter can now be ‘post’. When clicking images that are attached to a Post, Page or CPT, with this parameter set, the user will be taken to the images Post

2.1.6

  • Fixed bug where image alt tags were not being output properly.

2.1.5

  • Fixed bug where images were linked by default (defaults to no link now).
  • Fixed bug with mapping transitions from v1 to v2.
  • Fixed bug where the exclude parameter did not work properly.

2.1.4

  • Added backwards compat support for image cropping within shortcode/template tag parameters.

2.1.3

  • Fixed regression in link states for slides (defaults to no link).

2.1.1

  • Fixed bug with outputting HTML tags in NextGen dynamic slider captions.

2.1.0

2.0.1

  • Improvement of checks for dynamic slider on activation.

2.0.0

  • Say hello to version 2.0!
[i]
[i]