How to Create a Language Specific Popup in Convert Pro?

Convert Pro allows you to create Language Specific Call-to-actions to make sure you are serving the right audiences.

In order to proceed, first you need to create a new call-to-action for your specific language.

You will need the things mentioned below:

Add below code to your theme’s functions.php file,

function cpro_callback_function( $display, $style_id ) {
     
     if( $display ) {
        // Replace call-to-action id with your call-to-action ID
        if( '31' == $style_id ) {
            
            if( defined( 'ICL_LANGUAGE_CODE' ) ) {
            
                // get current language code
                $language_code = ICL_LANGUAGE_CODE;
                        
                // replace fr with your language code 
                if( 'fr' == $language_code ) {
                    $display = true;
                } else {
                    $display = false;
                }
            }
        }
    }
 
    return $display;
}
add_filter( 'cp_pro_target_page_settings', 'cpro_callback_function', 10, 3 );

 

Not the solution you are looking for? Check other articles, or open a support ticket.