Untitled-27 Back to Project

Getting Started Untitled-27

Customisation Untitled-27

Troubleshooting Untitled-27

Security Untitled-27

Users & roles Untitled-27

Working with Client Portal Untitled-27

Integrations Untitled-27

Legacy Documentation Untitled-27

How do I redirect clients to a different URL after they log out

This is an advanced workaround for Client Portal and involves editing your functions.php file. Please ensure you have a backup of your website before making this change. If you're not comfortable editing the functions.php file of your website, you can use a free plugin like Code Snippets to help.

When your clients click on the Log Out link, by default they will be redirected to the Client Portal login screen. Here's what to do if you would like to redirect them to any other URL:

First navigate to Appearance, Theme File Editor and find the functions.php link under Theme Files on the right hand side.

Then, paste the following snippet at the bottom of your functions.php file:

function my_leco_cp_logout_url() {
    // return the preferred URL.
    return home_url();
}
add_filter( 'leco_cp_logout_url', 'my_leco_cp_logout_url' );
}

The above snippet will redirect your clients to your home page when they log out of their portal.

Simply change home_url(); to anything you want, and you are good to go!