S
S
skdon2015-11-22 23:09:42
WordPress
skdon, 2015-11-22 23:09:42

How to "logout" a Wordpress user?

I don't know how to phrase the question, but the point is this. Changed the login page in the admin panel. How can I now organize the "Logout" button from the account, so that the path to the admin panel would not be visible? Those. so that there is no wp-login.php in the link, otherwise you can see the path to the admin panel at the link of the "Exit" button.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
skdon, 2015-11-23
@skdon

Did it like this:

<?
    if( isset( $_GET['logout'] ) )
     {
        wp_logout(); wp_redirect( home_url() );
      }
    ?>

Works :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question