How can I logout of a wordpress site using a link from another web app? (1 post)

  1. jlamerto
    Posted 4 years ago #

    I have been looking for a way to logout of a wordpress site from a link on another web app that lives in a subdir outside of wordpress.

    If the link points to:

    I get the WordPress Failure Notice page:
    "You are attempting to log out of My Domain"
    "Do you really want to log out?"

    Clicking on the link does delete the cookies but the Failure Notice page remains and I need it to redirect.

    I managed to get it to redirect correctly by adding to my functions.php

    function my_logout_url() {
    	return 'http://my.domain.net/wp-login.php?action=logout&redirect_to=http://my.domain.net/&loggedout=true';
    add_filter('logout_url', 'my_logout_url');

    But this doesn't logout the user.

    Anyone have any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic