Soliloquy Documentation

Documentation, Reference Materials, and Tutorials for Soliloquy

How to use Black & White Filter for Soliloquy Slider Images

Would you like to style your slider images to appear black and white until you hover? With a little custom CSS and Envira you can easily achieve this! We’ll help you with the CSS you need to apply a black and white filter over your slider images with color on hover.

This tutorial is a little more technical as it requires basic knowledge of HTML and CSS.

Setup

Step 1 – Install and activate the CSS Addon

Your first step will be to install and activate the Soliloquy CSS Addon.

If you need any assistance in installing addons, please take a look at this article.

For this instance, we’ll be installing the CSS Addon.

Activate the CSS addon

Step 2 – Create or edit your slider

Next, create a new slider or edit an existing one. You can follow along with our documentation for creating your first slider.

Step 3 – The CSS

Below is the CSS we’ve used in our demo.

Soliloquy Add B&W filter CSS to the Misc tab

You’ll need to change this ID number to match your slider ID number. You can find this by looking in the sidebar of your slider edit screen.

For more information on how to find your slider ID number you can read this article.

#soliloquy-container-508022 img {
    filter: grayscale(100%);
    transition: all 0.3s ease-in-out;
}
 
#soliloquy-container-508022 img:hover {
    filter: grayscale(0);
}
Be sure to update the -508022 with your own slider ID number

If you’d like to change this for all sliders, just add the CSS to the WordPress customizer.

Check out our demo of this in action!

Once you click Publish or Update on your slider, you’re all set!

Would you like to do some other cool things with styling Soliloquy? Take a look at our tutorial on How to Remove the Default Caption Background.

[i]
[i]