Each frontend page in Paid Memberships Pro has specific redirect rules. This documentation page explains the redirects logic in the core plugin, including how users and members are redirected on log in and when accessing the membership account area. We’ll also cover how you can customize redirect rules using filters.

Frontend Log In Redirects

All users are redirected to the Membership Account page after logged in via the “Log In” page. You can pass the redirect_to attribute to the Log In page to send the user directly back to a specific location on your site. This attribute, for example, is used by the Checkout Page in the “Already have an account? Log in here” link.

Redirect Members Back to Protected Content

Protected content displays the “Custom Membership Required Message (Legacy)” as set under Memberships > Settings > Advanced Settings. You can add the redirect_to attribute to the “Log In” link to redirect the member back to the referring content like this:

<a href="!!login_page_url!!?redirect_to=!!referrer!!">Login</a>

Core Page Redirection

Below is a list of all core PMPro frontend pages. Select a page from the list to read documentation on the default redirect rules for visitors and logged-in non-members (users).

Was this article helpful?
YesNo