wp_logout_url() redirects to confirmation page even with nonce?


I use wp_logout_url() to output a logout link. How can I avoid displaying the confirmation page that appears after clicking the link?

<a href="<?= wp_logout_url(get_permalink()); ?>">Log out</a>

Why does this even happen? I already did some googling and it seems to have something to do with a missing nonce but in my case the nonce isn’t missing at all. wp_logout_url() adds the nonce to the link.

, horace 3 years 2020-04-02T20:51:24-05:00 0 Answers 102 views 0

Leave an answer