Soliloquy Documentation
Documentation, Reference Materials, and Tutorials for Soliloquy
Documentation, Reference Materials, and Tutorials for Soliloquy
Would you like add custom HTML to slides for Soliloquy? You can easily do this by installing a custom plugin on your site! We’ll walk you through the steps on how to add custom HTML to your slider images.
Note: This tutorial is a bit more technical than our other docs, but we’ll walk you through the process step by step. In order to add some custom HTML to your slider items, we’ll need to create and upload a basic WordPress plugin.
To create this custom query filter, just add the following code to a new file at wp-content/plugins/soliloquy-add-custom-html-to-slides.php
.
// If the ID doesn’t match the one we want to modify, return the default HTML output. Change 324 to your image ID.
if ( 265 == $id )
return $html;
// Append custom code output of the caption to do whatever.
$html .= ‘<div class="my-custom-class"><p>My custom stuff!</p></div>’;
// Return the modified HTML output.
return $html;
}[/php]
If you’re unsure how to create a plugin file, follow these steps below:
soliloquy-add-custom-html-to-slides.php
Note: It’s important to make sure you’ve set your slider ID name inside the plugin on line 14. Just replace the 265
with the slider ID of your slider.
Your next step is to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the Soliloquy – Add Custom HTML to Slides plugin.
Finally, if you’d like some simple CSS to get you started, take a look at the CSS below.
[css].my-custom-class {That’s it! You’ve successfully added custom HTML to your slides.
Would you like to customize Soliloquy further? Have a look at our tutorial on How to filter a Featured Content slider with custom queries.