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

How do I redirect clients to the homepage after logged out

Woah there! This is an advanced workaround for Client Portal. Make sure you backup your WordPress website or edit via your FTP before changing any codey things.

When your clients click on the Log Out link, by default, it's the Client Portal login screen, but you can redirect them to your homepage, or any other URL.

The following snippets can help you with it, you'll need to put it to 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' );