wordpress logout user

example

<div ><a href=”<?php echo wp_logout_url( ); ?>” title=”Logout”>Logout</a></div>

How to logout user using another way ?

If you want to logout user own way then you can do using following

code

  <?php
   require_once('wp-blog-header.php');
  // this is root file so adjust your pah accordingly
  
  wp_clear_auth_cookie();
 //this will logout user
 ?>