Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Okoth1

    (@okoth1)

    Since I can’t edit my post, here is the one I intented to write:

    I want to add the link logout at my sidebar menu.

    I have added (via Dashboard -> Links) the link ‘Logout’. It used to work well when I used the link ‘https://example.com/subfolder/wp-login.php?action=logout’. Not anymore since WordPress 2.7.
    https://example.com/subfolder/wp-login.php’ works fine to login.

    I am using a link widget (in my case BP Links+).

    Putting <?php echo wp_logout_url(); ?> doesn’t work here since I need to have a ‘https://example.com/subfolder/&#8230;.’ link. At all others places at the website https://example.com/subfolder/wp-login.php works well.

    What link do I need to use to make the logout work?

    Thread Starter Okoth1

    (@okoth1)

    Anyone?

    Do this work ?

    https://example.com/subfolder/wp-login.php?loggedout=true

    Gaston

    Thread Starter Okoth1

    (@okoth1)

    No, this link doesn’t do the actual logout. It just send me to the login page with the message that I have logged out.

    When I go back to the website and refresh with F5 I am still logged in…

    What could be another option?

    I’d be very interested in the answer to this also. Is there in fact a solution now that wp_logout_url has been implemented?

    you can try this one :

    <a href='<?php echo wp_logout_url(); ?>'>Logout</a>

    or you can add redirect option to your homepage :

    <a href='<?php echo wp_logout_url(); ?>&redirect_to=/'>Logout</a>

    i hope this help ??

    Thread Starter Okoth1

    (@okoth1)

    Sorry, it doesn’t help. See the second post where I wrote: Putting <?php echo wp_logout_url(); ?> doesn’t work here since I need to have a ‘https://example.com/subfolder/&#8230;.’ link.

    Your solution doesn’t start with http…

    Thanks for trying

    I have the same problem, too.

    The actual logout URL should be like

    https://www.domain.com/home/wp-login.php?action=logout&_wpnonce=0552b1e309

    , so the last part “wpnonce” seems to be missing calling wp_logout_url();

    Without it, the user SEEMS to be logged out, the redirect takes him (correctly?) to the login page, BUT the session is kept; if he go back to the site, for example opening a new tab, he will be still logged in.

    I’m using 2.7.1 and the function above.

    I didn’t find a solution …Anyone can help ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘What logout link to put in sitebar?’ is closed to new replies.