WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
[resolved] add_filter doesnt work (4 posts)

  1. mathi
    Member
    Posted 1 year ago #

    hi,
    some filters i put in functions.php are working, i.e. the login-redirect one.
    but not the logout-redirect.:

    add_filter( 'wpmem_logout_redirect', 'my_logout_redirect' );

    function my_logout_redirect()
    {
    // return the url that the logout should redirect to
    return 'http://yourdomain.com/your-page';
    }

    (got it here: http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/wpmem_logout_redirect/)

    what can i do ?
    ps. didn't copy/paste and put in my page name

    thanx for answering
    mathi

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 1 year ago #

    The logout redirect filter only affects logging out via the plugin's logout. So logging out via some other logout link/process wouldn't be filtered. Some of these would include the WP admin bar, comments template link, the WP default meta widget contains a logout link. Are you logging out via any of those?

  3. mathi
    Member
    Posted 1 year ago #

    Yes, i logged out with wp's comments template link. Now i use the member-area one of wp-members and : IT WORKS!
    Chad, thanx for your answer, thanx for this great pluggin and thanx for your permanent support on this platform!
    mathi

  4. Chad Butler
    Member
    Plugin Author

    Posted 1 year ago #

    No problem.

    For these other links, you could remove them or change them to use the link for the wp-members logout. Or, probably easiest/best, I think you could use the WordPress filter wp_logout_url.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic