Skip to content

Instantly share code, notes, and snippets.

@thomasgriffin
Created November 18, 2013 02:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thomasgriffin/7521701 to your computer and use it in GitHub Desktop.
Save thomasgriffin/7521701 to your computer and use it in GitHub Desktop.
Add custom HTML to Soliloquy slides.
<?php
add_filter( 'tgmsp_caption_output', 'tgm_soliloquy_custom_html', 10, 4 );
function tgm_soliloquy_custom_html( $html, $id, $image, $i ) {
// If the ID doesn't match the one we want to modify, return the default HTML output. Change 324 to your slider ID.
if ( '324' !== $id )
return $html;
// Append custom code output of the caption to do whatever. $i is the number of the slide.
$html .= '<div class="my-custom-class"><p>My custom stuff!</p></div>';
// Return the modified HTML output.
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment