Logout function in WordPress


Everyday we found new functions to implement in our WordPress site to make it faster and easier to use. These functions can range from something as simple as changing a category to embedding custom widgets on it. Today we want to talk about one of the most simple functions that still we tend to overlook, the logout function.

Let’s take a look at some examples of the wp_logout_url() function in WordPress. We can pass the parameter to the URL of destiny that we want to perform the redirection after ending the session.

</p>  <p>// Logout and redirection to the current page from where we have logged out.    <br />wp_logout_url($_SERVER['REQUEST_URI']);     <br />// Logout and redirection to the main page of the domain.     <br />wp_logout_url('/');</p>  <p>

Original link: WordPress logout.

Comments and suggetiions in here


Commenting is the best way to say thanks :)

2 people showed their love and said thanks, will you?

  1. Useful tips that is so applicable to all fellow readers. I think these are all very efficient and effective things that everyone should learn.

  2. Miguel - May 12th

    Everything is on the details, they say. Thank you.

Check The Full DesignShock Bundle