Slider Revolution is a slider plugin designed for WordPress and very popular.
The latest version of the plugin has changed the ergonomy and some features are not easy to find or not included at all.
For example, it is not possible to include a pause/play button to pause the slider and then resume it.
The play and pause functionalities are present but it is not possible to “switch” a button at the visitor’s click.
Here is a fairly quick way to implement this feature.
Preparation
You will need two images (play and pauses) that can be easily found on icon sites. For example iconfinder :
Then, you must have access to editing your WordPress theme or by creating a new plugin.
Slider Revolution
Into Slider Revolution, choose the “Global Layers” you will have to create two image layers, import your two play and pause images.
Then place them where you want in your slider and on each layer, select “Actions“.
And choose “Play Slide” and “Pause Slide” according to the selected image:
Now go to “Attributes“, then in the “classes” field, add :
- “pause-button current” for the pause button
- “play-button” for the play button
Save all, and test your slider to see if your buttons work.
A little bit of code
Now that the buttons are ok, they should work. However, having both a play and a pause button is not very ergonomic, one should disappear when the other appears.
Then insert this code in your file in a javascript file of your theme :
And simply replace “#rev_slider_2_1_wrapper” with the div id of your slider.
Congratulations! Your buttons should now be 100% functional.
Still stuck ? You can contact an expert.
It works, but every time a slide change happens both the play and pause button appear at the same time again, if they have already been clicked. I can’t figure out how to fix this, any ideas?