User Redirection - YourMembers/yourmembers GitHub Wiki

Your Members can easily manage member redirection on your site. This can include when a member logs in, attempts to visit the WordPress admin dashboard or logs out. Your Members can intercept these requests and redirect your member to a location of your choice.

The redirects can be set globally or on a per package basis.

Before you start!

Have you read the Quick Start Guide or How To Build a WordPress Membership Site if you haven't please check them out before continuing as this document assumes you are familiar with those documents.

Per Package

First of all, navigate to the Your Members dashboard and select the Memberships tab, then the Packages sub-tab. Then, choose one of your packages and select the edit link:

This will then reveal the package edit screen. By default it will show basic information so you need to toggle the drop down to Advanced :

This will then reveal more options. Scroll down the page until you see a number of input fields where you can enter the redirection locations.

  • Login Redirect URLWhen your member logs into your site, instead of landing on the WordPress default profile page in the WordPress dashboard, you can redirect the member to a more suitable location, even something as simple as your front page.
  • WP Admin Block URLIf a logged in member attempts to access their WordPress profile page they would ordinarily be directed to the WordPress dashboard showing details commensurate with their WordPress role. By using this Your Members redirect, this behaviour can be intercepted and the member redirected to a page of your choice. An excellent example would be a Member Profile page.
  • Logout Redirect URLWhen your member decides to leave your site and logs out, this redirection can show them a page or post of your choice. You may want to build a custom Goodbye page or maybe show them a list of possible account upgrades.

Global Redirection

If you navigate to Your Members --> Advanced --> Redirects you will see a list of redirection input fileds as shown in the below image. This shows the per-package redirects that you may have entered together with input fields for global redirection. If you only fill out the top three fields, these redirections will apply to all packages that do not have their own specific redirections.

Shortcode Redirects

A member standard redirect maybe overridden by an argument in the [ym_login] shortcode. If the ym_login shortcode has the argument redirect= then this is used rather then the Login redirect url. For example:
 [ym_login redirect="/myarticle/"] 
would on successful login redirect the user to /myarticle/ to redirect a login to itself simply copy the url of the post into the redirect argument. For example:
 [ym_login redirect="/user-redirection/"] 
⚠️ **GitHub.com Fallback** ⚠️