Codex

Function Reference/wp logout

Contents

Description

Log the current user out, by destroing the current user session.

Usage

 <?php wp_logout(); ?> 

Parameters

This function does not accept any parameters.

Example

<p><?php wp_logout(); ?></p>

Change Log

Since: 2.5.0

Source File

wp_logout() is located in wp-includes/pluggable.php.

Related

is_user_logged_in, wp_login_url, wp_logout_url, wp_lostpassword_url, wp_logout, wp_loginout, wp_register

See also index of Function Reference and index of Template Tags.