Appending Markup to Slides in Soliloquy

This is a simple little snippet. On a project I’m working I had a need to include social share buttons with each item in a carousel slider.

Anyone who asks me knows that I’m a big fan of Soliloquy, from Thomas Griffin Media. I’m a fan because it’s a simple solution with some nifty add-ons and does what I need it to without too much fuss.

With the 2.x update Soliloquy added some filters to their plugin, making adding your own markup to your slides easier.

/* Filter to Append HTML to Slides
============================================= */
add_filter( 'soliloquy_output_slide', 'tgm_soliloquy_custom_html', 10, 4 );
function tgm_soliloquy_custom_html( $html, $id, $image, $data ) {

$slider_id = $data; // Get Slider ID
$slider_img= $image; // Optional; Getting Image URL from slider object

if ( '1937' != $slider_id ) return $html; // If the ID doesn't match...


Being that blunt about my own short comings and managing her expectations of me was probably the single best thing I did for our long term happiness.

— Ted Govostis