{"id":24004,"date":"2016-06-03T11:43:33","date_gmt":"2016-06-03T06:13:33","guid":{"rendered":"https:\/\/docs.brainstormforce.com\/?p=3127"},"modified":"2021-01-14T12:59:49","modified_gmt":"2021-01-14T07:29:49","slug":"how-to-create-a-language-specific-popup-in-convertplug","status":"publish","type":"docs","link":"https:\/\/convertplug.com\/plus\/docs\/how-to-create-a-language-specific-popup-in-convertplug\/","title":{"rendered":"How to Create a Language Specific Popup in ConvertPlug?"},"content":{"rendered":"\n<p>ConvertPlug allows you to create Language Specific Popups to make sure you are serving the right audiences.<\/p>\n\n\n\n<p>In order to proceed, first you need to create a new popup for your specific language.<\/p>\n\n\n\n<p>You will need the things mentioned below:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>WPML installed on your site.<\/li><li>Your style ID &#8211; You can find it here in your style customizer screen &#8211; &nbsp;<a href=\"http:\/\/goo.gl\/EOXUlD\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/goo.gl\/EOXUlD<\/a><\/li><li>Your language code &#8211; WPML -&gt; Languages -&gt; Edit languages screen Here-&nbsp;<a href=\"http:\/\/goo.gl\/KCHmRq\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/goo.gl\/KCHmRq<\/a><\/li><\/ul>\n\n\n\n<p>Add below code to your theme&#8217;s functions.php file,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted lang:php decode:true\">function cp_callback_function( $display, $style_id ) {\n     \n     if( $display ) {\n        \/\/ Replace style id with your style ID\n        if( $style_id == 'cp_id_75944' ) {\n     \n            \/\/ get current language code\n            $language_code = ICL_LANGUAGE_CODE;\n                    \n                    \/\/ replace fr with your language code \n            if( $language_code == 'fr' ) {\n                $display = true;\n            } else {\n                $display = false;\n            }\n     \n        }\n    }\n \n    return $display;\n}\nadd_filter( 'cp_target_page_settings', 'cp_callback_function', 10, 3 );<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ConvertPlug allows you to create Language Specific Popups to make sure you are serving the right audiences. In order to proceed, first you need to create a new popup for your specific language. You will need the things mentioned below: WPML installed on your site. Your style ID &#8211; You can find it here in [&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":[442],"docs_tag":[],"class_list":["post-24004","docs","type-docs","status-publish","hentry","docs_category-general-issues-solutions"],"_links":{"self":[{"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs\/24004","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\/24004\/revisions"}],"predecessor-version":[{"id":24104,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs\/24004\/revisions\/24104"}],"wp:attachment":[{"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/media?parent=24004"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs_category?post=24004"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/convertplug.com\/plus\/wp-json\/wp\/v2\/docs_tag?post=24004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}