• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Store
    • Cart
    • Checkout
  • Blog
    • Basics [Free]
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Contact
  • Sign In
  • Show Search
Hide Search
Home » Filters » User redirection on logout

User redirection on logout

Chad Butler · Oct 2, 2012 ·

The default setup of the plugin will redirect the the user to the blog’s home page when they click the logout link. But what if you want to direct them somewhere else when they are logging out. Here are some ideas on how to do that.

This article is only available to WP-Members Support Subscribers. If you have an existing subscription, please login below. If you do not have a current support subscription, you can purchase a support subscription here.

Already a Member? Log In Here
   
Forgot password? Click here to reset

To gain full access to WP-Members premium content, a current support subscription is required. You can purchase an annual support subscription for as little as $59, which provides you with access to priority support, a customer support forum, access to code snippets, and more.

Why wait? Choose your subscription option here.

[
Why join?]

Filters filters, hooks, wpmem_logout_redirect

Welcome to RocketGeek Interactive › Forums › User redirection on logout

Tagged: filters, hooks, wpmem_logout_redirect

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 11 months ago by Chad Butler.
Viewing 2 reply threads
  • Author
    Posts
    • October 2, 2012 at 5:17 pm #1399
      Chad Butler
      Keymaster

      The default setup of the plugin will redirect the the user to the blog’s home page when they click the logout link. But what if you want to direct the
      [See the full post at: User redirection on logout]

    • March 22, 2013 at 1:49 pm #2300
      mickcathey
      Participant

      login redirect works, logout still redirects to wp-login.  Here is what I have in my wp-members-pluggable.php file:

      <?php

      add_filter( ‘wpmem_login_redirect’, ‘my_login_redirect’ );

      function my_login_redirect()
      {
      // return the url that the login should redirect to
      return ‘http://pbymf.org/members-home-page/&#8217;;
      }

      add_filter( ‘wpmem_logout_redirect’, ‘my_logout_redirect’ );

      function my_logout_redirect()
      {
      // return the url that the logout should redirect to
      return ‘http://pbymf.org/&#8217;;
      }

      ?>

      Please help.

      Thanks

    • March 22, 2013 at 2:09 pm #2301
      Chad Butler
      Keymaster

      The plugin’s logout redirect filter only effects the plugin’s logout links (such as the one that would display in the plugin’s sidebar widget when you are logged in).  Any other logout links (such as in comments or the default WP meta widget) would need to be managed separately.

      Do you think the reason that the link we are talking about not redirecting could be one of those?

  • Author
    Posts
Viewing 2 reply threads
  • You must be logged in to reply to this topic.
Log In

Ready to get started?

Join Today!

© 2021 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Refund Policy