{"id":11093,"date":"2017-09-12T16:12:50","date_gmt":"2017-09-12T10:42:50","guid":{"rendered":"http:\/\/convertplug.com\/plus\/?post_type=docs&#038;p=11093"},"modified":"2018-06-02T10:16:32","modified_gmt":"2018-06-02T04:46:32","slug":"change-labels-in-countdown-style","status":"publish","type":"docs","link":"https:\/\/convertplug.com\/plus\/docs\/change-labels-in-countdown-style\/","title":{"rendered":"How to Change the Labels in the Countdown style?"},"content":{"rendered":"<p>Have you ever thought of changing the labels seen in Countdown style?<\/p>\n<p><a href=\"http:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Change-labels-in-Countdown-style.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11094 size-full\" src=\"http:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Change-labels-in-Countdown-style.jpg\" alt=\"Change Labels In Countdown Style\" width=\"2048\" height=\"1190\" title=\"How to Change the Labels in the Countdown style?\" srcset=\"https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Change-labels-in-Countdown-style.jpg 2048w, https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Change-labels-in-Countdown-style-300x174.jpg 300w, https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Change-labels-in-Countdown-style-768x446.jpg 768w, https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Change-labels-in-Countdown-style-1024x595.jpg 1024w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/p>\n<p>You can do that using the filter we are about to introduce in this article. But, before we move on, it is important for you to make note of the style ID of the popup you wish to implement the change in.<\/p>\n<p>Here is a screenshot that will help you identify the style ID of the popup.<\/p>\n<p><a href=\"http:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Style-ID.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11095 size-full\" src=\"http:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Style-ID.jpg\" alt=\"Style ID\" width=\"2048\" height=\"1188\" title=\"How to Change the Labels in the Countdown style?\" srcset=\"https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Style-ID.jpg 2048w, https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Style-ID-300x174.jpg 300w, https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Style-ID-768x446.jpg 768w, https:\/\/convertplug.com\/plus\/wp-content\/uploads\/sites\/4\/2017\/09\/Style-ID-1024x594.jpg 1024w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/p>\n<p>Add the style ID in the code below. This code has to be added to the functions.php file of your theme.<\/p>\n<pre>\/**\r\n * to change lables for countdown style\r\n *\/ \r\nadd_filter( 'cp_change_countdown_label', 'cp_change_label_function', 10, 3 );\r\n\r\nfunction cp_change_label_function( $label_arr, $style_id ){    \r\n\r\n    \/\/ Replace style id with your style ID\r\n    if( $style_id == 'cp_id_db11b' ) {\r\n        $label_arr = array('A\u00f1o', 'Mes', 'Semanas', 'D\u00edas', 'Horas', 'Minutos', 'Segundos'); \/\/ if you want labels for this specific style id in spanish then change values form array in spanish\r\n    }\r\n    return $label_arr;    \r\n}\r\n\r\n\/**\r\n * to change compact lables for countdown style\r\n *\/ \r\nadd_filter( 'cp_change_countdown_cmp_label', 'cp_change_cmp_label_function', 10, 3 );\r\n\r\nfunction cp_change_cmp_label_function( $compact_labels, $style_id ){    \r\n    \/\/ Replace style id with your style ID\r\n    if( $style_id == 'cp_id_75944' ) {\r\n        $compact_labels = array('Y','M','W','D','H','Mn','S');    \/\/replace this compact labels value with your language     \r\n    }    \r\n    return $compact_labels;    \r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever thought of changing the labels seen in Countdown style? You can do that using the filter we are about to introduce in this article. But, before we move on, it is important for you to make note of the style ID of the popup you wish to implement the change in. Here [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"template":"","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"docs_category":[20],"docs_tag":[],"class_list":["post-11093","docs","type-docs","status-publish","hentry","docs_category-general"],"_links":{"self":[{"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs\/11093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/users\/12"}],"version-history":[{"count":2,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs\/11093\/revisions"}],"predecessor-version":[{"id":22056,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs\/11093\/revisions\/22056"}],"wp:attachment":[{"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/media?parent=11093"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs_category?post=11093"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs_tag?post=11093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}