I want to logout a user if the user click on custom page link (e.g. example.com/logout). I need to do that because my site users are not allowed to access wp-login.php page. I've a front-end login page but don't have logout page.
How can I make custom page as logout link? With or without shortcode.