Please add the following snippet in your child theme’s functions.php file or you can use a plugin that allows adding code snippets on WordPress site. Please notice that you have to enter your custom URL in wp_redirect function.
add_action('wp_logout','ps_redirect_after_logout');
function ps_redirect_after_logout(){
wp_redirect( 'your url here' );
exit();
}
Hopefully, this will help you.
Thanks
]]>1 – I create a page called “logout-page”
2 – create logout link -> https://www.example.club/logout-page/
3 – add the code in the functions file
now I have explained well
]]>You need to add the logout link https://example.com/wp-login.php?action=logout in the menu and then have to use this URL https://www.example.club/logout-page/for redirection and change the code to wp_redirect('https://www.example.club/logout-page/');
I guess on logout action you want users to redirect on this page https://www.example.club/logout-page/.
Thanks
]]>