• Hello,

    I’m using the popup on multiple different parts of the website, I need it to be able to redirect users to a specific page after creating an account / registering. The main purpose is controlling locked content. How can I differentiate all the popups? Or create a specific one for each situation so each one can lead to a different redirect.

Viewing 1 replies (of 1 total)
  • Plugin Contributor xootixsupport

    (@xootixsupport)

    Hello @randallishino

    Wrote this snippet, its a if/else statement based on your page Ids.
    add this to your functions.php

    //Update redirect url
    function xoo_cu_el_update_gl_option( $gl_options ){
    
    	remove_filter('pre_option_xoo-el-general-options', 'xoo_cu_el_update_gl_option');
    
    	$gl_options = get_option('xoo-el-general-options');
    	
    	$login_redirect = $gl_options['m-login-url'];
    	$reg_redirect   = $gl_options['m-redirect-url'];
    
    	//Login redirect url on page id
    	if( is_page(6) ){
    		$gl_options['m-login-url'] = "https://url.com";
    		$gl_options['m-redirect-url'] = "https://url.com";
    	}
    	elseif( is_page(7) ){
    		$gl_options['m-login-url'] = "https://url1.com";
    	}
    	elseif( is_page(8) ){
    		$gl_options['m-login-url'] = "https://url2.com";
    	}
    	else{
    		//For all other pages
    	}
    
    	return $gl_options;
    
    }
    add_filter('pre_option_xoo-el-general-options', 'xoo_cu_el_update_gl_option');
Viewing 1 replies (of 1 total)
  • The topic ‘using multiple redirects’ is closed to new replies.