How to Display a Module only when a specific Convert Plus Module is seen?

Have you ever thought of displaying a Convert Plus module only after a user has successfully submitted another module?

You can do that using the target page settings.

We do not have a default option to display a module only if some specific cookies set. But, you can achieve this using target page filter ‘cp_target_page_settings‘ which handles the visibility of a module and cookies of the module which is set after successful submission of the form.

Here is an article we have for target page settings in Convert Plus.

You can add this code in your theme’s function.php file.

Here is a reference for the code that can be added.

function your_callback_function( $display, $style_id ) {
$cookie_name = 'style_id2'; //change the cookiename as per your style id.

// Replace style id with your style ID
if( $style_id == 'cp_id_d3a5b' ) {

// your custom logic
$display = false;

if(isset($_COOKIE[$cookie_name])){
$display = true;
}
   
}

return $display;
}
add_filter( 'cp_target_page_settings', 'your_callback_function', 10, 3 );
Not the solution you are looking for? Check other articles, or open a support ticket.