October 17, 2018
The following works in multiple languages and can be used inline:
<a href="<?php echo wp_logout_url() ?>">Log out</a>
Logout and redirect to a page:
<a href="<?php echo wp_logout_url('/login') ?>">Logout</a>
I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.