wp_logout_url()

Twig function of the framework; its result is escaped like any value.

{{ wp_logout_url(redirect = '') }}

The URL that logs the current user out, as returned by wp_logout_url(). It contains a nonce of the user's session, so a block with #[Cache] cannot use it: the call throws an error there.

<a href="{{ wp_logout_url(wp_home_url()) }}">Log out</a>
ParameterTypeDefaultDescription
redirectstring''URL to go to after logging out; '' for the default of WordPress.

Returns string