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

  1. mathi
    Posted 3 years ago #

    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


  2. Chad Butler
    Plugin Author

    Posted 3 years 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
    Posted 3 years 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!

  4. Chad Butler
    Plugin Author

    Posted 3 years 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

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic