/* Logout Redirect */
function wpflt_redirect_url_logout(){
wp_redirect( 'https://example.com/' );
exit();
}
add_action('wp_logout','wpflt_redirect_url_logout');
In order to redirect users to any Custom URL in WordPress after logout, add the above code to your child theme’s functions.php. Replace the URL in line 4 with the URL you want your users/ customers to be taken to.
If you want to redirect logout URL to Home Page, you can use your home URL in the above code or you can replace it with home_url().