skip to Main Content

Search WordPress Code Snippets – Quick Solutions for Developers


How to Create a Custom Redirect on Logout

Redirect users to a custom page when they log out.

add_action('wp_logout', 'codebykp_custom_logout_redirect');
function codebykp_custom_logout_redirect() {
    wp_redirect(home_url('/goodbye'));
    exit();
}


I’m a WordPress developer with 10+ years of experience in WooCommerce and custom plugins. I combine technical expertise with design flair to help you create standout, user-friendly websites. Let’s transform your digital presence!

Back To Top