{"id":1421,"date":"2020-03-26T17:00:53","date_gmt":"2020-03-26T16:00:53","guid":{"rendered":"https:\/\/www.wp-moon.com\/?p=1421"},"modified":"2022-03-30T14:42:58","modified_gmt":"2022-03-30T12:42:58","slug":"add-play-pause-button-slider-revolution","status":"publish","type":"post","link":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/","title":{"rendered":"Add a play\/pause button on Slider Revolution"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Slider Revolution is a slider plugin designed for WordPress and very popular.<br> The latest version of the plugin has changed the ergonomy and some features are not easy to find or not included at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, it is not possible to include a pause\/play button to pause the slider and then resume it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The play and pause functionalities are present but it is not possible to &#8220;switch&#8221; a button at the visitor&#8217;s click. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a fairly quick way to implement this feature.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Preparation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You will need two images (play and pauses) that can be easily found on icon sites. For example <em>iconfinder <\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.iconfinder.com\/icons\/15315\/media_playback_icon\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (s\u2019ouvre dans un nouvel onglet)\">Play button<\/a><\/li><li><a rel=\"noreferrer noopener\" aria-label=\" (s\u2019ouvre dans un nouvel onglet)\" href=\"https:\/\/www.iconfinder.com\/icons\/15314\/media_pause_playback_icon\" target=\"_blank\">Pause button<\/a><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Then, you must have access to editing your WordPress theme or by creating a new plugin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Slider Revolution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Into Slider Revolution, choose the &#8220;Global Layers&#8221; you will have to create two image layers, import your two <em>play <\/em>and <em>pause images<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then place them where you want in your slider and on each layer, select &#8220;<strong>Actions<\/strong>&#8220;.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"312\" height=\"302\" src=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/actions-1.jpg\" alt=\"\" class=\"wp-image-1422\" srcset=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/actions-1.jpg 312w, https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/actions-1-300x290.jpg 300w\" sizes=\"(max-width: 312px) 100vw, 312px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">And choose &#8220;<strong>Play Slide<\/strong>&#8221; and &#8220;<strong>Pause Slide<\/strong>&#8221; according to the selected image:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"828\" height=\"212\" src=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/actions-detail.png\" alt=\"\" class=\"wp-image-1423\" srcset=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/actions-detail.png 828w, https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/actions-detail-300x77.png 300w, https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/actions-detail-768x197.png 768w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now go to &#8220;<strong>Attributes<\/strong>&#8220;, then in the &#8220;<em>classes<\/em>&#8221; field, add :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>&#8220;<em>pause-button current<\/em>&#8221; for the pause button<\/li><li>&#8220;<em>play-button<\/em>&#8221; for the play button<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"313\" height=\"480\" src=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/attributes.png\" alt=\"\" class=\"wp-image-1415\" srcset=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/attributes.png 313w, https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/attributes-196x300.png 196w\" sizes=\"(max-width: 313px) 100vw, 313px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Save all, and test your slider to see if your buttons work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A little bit of code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then insert this code in your file in a javascript file of your theme :<\/p>\n\n\n\n<figure><iframe src=\"https:\/\/pastebin.com\/embed_iframe\/0m9tccJZ\" style=\"border:none;width:100%;height:300px\"><\/iframe><\/figure>\n\n\n\n<div style=\"height:27px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">And simply replace &#8220;#rev_slider_2_1_wrapper&#8221; with the div id of your slider.<\/p>\n\n\n\n<div style=\"height:45px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Congratulations! Your buttons should now be 100% functional.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Add a play\/pause button on Slider Revolution<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":1407,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[147],"tags":[126],"class_list":["post-1421","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-slider-revolution"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Add a play\/pause button on Slider Revolution - WP Moon<\/title>\n<meta name=\"description\" content=\"The play and pause functionalities are present but it is not possible to &quot;switch&quot; the button. Here is a quick way to implement this feature.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add a play\/pause button on Slider Revolution - WP Moon\" \/>\n<meta property=\"og:description\" content=\"The play and pause functionalities are present but it is not possible to &quot;switch&quot; the button. Here is a quick way to implement this feature.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Moon\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpmoonwebsite\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-26T16:00:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-30T12:42:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/Slider-Revolution.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1180\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alexandre G\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@alexgaboriau\" \/>\n<meta name=\"twitter:site\" content=\"@WPMoon4\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexandre G\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add a play\/pause button on Slider Revolution - WP Moon","description":"The play and pause functionalities are present but it is not possible to \"switch\" the button. Here is a quick way to implement this feature.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/","og_locale":"en_US","og_type":"article","og_title":"Add a play\/pause button on Slider Revolution - WP Moon","og_description":"The play and pause functionalities are present but it is not possible to \"switch\" the button. Here is a quick way to implement this feature.","og_url":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/","og_site_name":"WP Moon","article_publisher":"https:\/\/www.facebook.com\/wpmoonwebsite","article_published_time":"2020-03-26T16:00:53+00:00","article_modified_time":"2022-03-30T12:42:58+00:00","og_image":[{"width":1180,"height":600,"url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/Slider-Revolution.jpg","type":"image\/jpeg"}],"author":"Alexandre G","twitter_card":"summary_large_image","twitter_creator":"@alexgaboriau","twitter_site":"@WPMoon4","twitter_misc":{"Written by":"Alexandre G","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#article","isPartOf":{"@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/"},"author":{"name":"Alexandre G","@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/person\/72a64e6910977ec9e4b32fd8da54369d"},"headline":"Add a play\/pause button on Slider Revolution","datePublished":"2020-03-26T16:00:53+00:00","dateModified":"2022-03-30T12:42:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/"},"wordCount":286,"commentCount":1,"publisher":{"@id":"https:\/\/www.wp-moon.com\/en\/#organization"},"image":{"@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/Slider-Revolution.jpg","keywords":["slider revolution"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/","url":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/","name":"Add a play\/pause button on Slider Revolution - WP Moon","isPartOf":{"@id":"https:\/\/www.wp-moon.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#primaryimage"},"image":{"@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/Slider-Revolution.jpg","datePublished":"2020-03-26T16:00:53+00:00","dateModified":"2022-03-30T12:42:58+00:00","description":"The play and pause functionalities are present but it is not possible to \"switch\" the button. Here is a quick way to implement this feature.","breadcrumb":{"@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#primaryimage","url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/Slider-Revolution.jpg","contentUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/03\/Slider-Revolution.jpg","width":1180,"height":600,"caption":"Slider Revolution"},{"@type":"BreadcrumbList","@id":"https:\/\/www.wp-moon.com\/en\/add-play-pause-button-slider-revolution\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wp-moon.com\/en\/"},{"@type":"ListItem","position":2,"name":"Tutoriels","item":"https:\/\/www.wp-moon.com\/category\/tutoriels\/"},{"@type":"ListItem","position":3,"name":"Add a play\/pause button on Slider Revolution"}]},{"@type":"WebSite","@id":"https:\/\/www.wp-moon.com\/en\/#website","url":"https:\/\/www.wp-moon.com\/en\/","name":"WP Moon","description":"","publisher":{"@id":"https:\/\/www.wp-moon.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wp-moon.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.wp-moon.com\/en\/#organization","name":"WP Moon","url":"https:\/\/www.wp-moon.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/02\/logo.png","contentUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/02\/logo.png","width":290,"height":95,"caption":"WP Moon"},"image":{"@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/wpmoonwebsite","https:\/\/x.com\/WPMoon4"]},{"@type":"Person","@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/person\/72a64e6910977ec9e4b32fd8da54369d","name":"Alexandre G","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2023\/09\/312419460_10229483707296045_2919774527885824513_n-100x100.jpg","url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2023\/09\/312419460_10229483707296045_2919774527885824513_n-100x100.jpg","contentUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2023\/09\/312419460_10229483707296045_2919774527885824513_n-100x100.jpg","caption":"Alexandre G"},"description":"Alexandre, Web Developer &amp; Website Editor. I've been using WordPress for over 10 years in my professional environment and on personal projects. I created WP Moon to teach you how to use this CMS, solve your problems and show you all the tricks.","sameAs":["https:\/\/www.croque-pixel.com\/","https:\/\/x.com\/alexgaboriau","https:\/\/www.youtube.com\/@wp_moon\/videos"],"url":"https:\/\/www.wp-moon.com\/en\/author\/wp-moon\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/posts\/1421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/comments?post=1421"}],"version-history":[{"count":0,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/posts\/1421\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/media\/1407"}],"wp:attachment":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/media?parent=1421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/categories?post=1421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/tags?post=1421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}