Create Log Out Button (with Nonce)

The following works in multiple languages and can be used inline:

<a href="<?php echo wp_logout_url() ?>">Log out</a>

Source.

Logout and redirect to a page:

<a href="<?php echo wp_logout_url('/login') ?>">Logout</a>

Source.

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.