Introductory Pricing: Save 50% on your first year of any plan. Use coupon code:

FIRSTYEAR50

  • Log In
  • Welcome
  • Features
  • Pricing
  • Documentation
  • Case Studies
  • Add Ons
  • Support
  • Learn
  • Events
  • Blog
  • Contact

Log In

Join Now | Lost Password?
Skip to content
Paid Memberships Pro WordPress Membership Plugin
  • Log In
  • Choose a Plan
  • Features
    • PMPro Platform
      • Plugin Features
      • Restrict Access
      • Register Members
      • Subscriptions
      • All Features
    • Payment Gateways
      • Stripe
      • PayPal Express
      • Paystack
      • CCBill
      • All Gateways
    • Add Ons
      • Integrations
      • Free Add Ons
      • Standard Add Ons
      • Plus Add Ons
      • All Add Ons

    Launch a Free Demo
    Explore PMPro in action with your own private demo site—preloaded with members, protected content, and premium Add Ons.

    Try PMPro Now
  • Use Cases
    • Associations
    • Blog and News
    • Communities
    • Courses
    • Directories
    • Paid Newsletters
    • Private Videos
    • Podcasting
  • Documentation
    • Download & Install
      • Download PMPro
      • Install Add Ons
      • Memberlite Theme
      • Setup WordPress
      • Staging Sites
      • Support
    • Initial Setup
      • Customize Pages
      • Payment Settings
      • Restrict Content
      • Membership Levels
      • Member Emails
      • User Fields
    • More Docs
      • Shortcodes & Blocks
      • Design Settings
      • Page Builders
      • Reporting
      • For Developers
      • Actions & Filters
      • All Docs

    Get your membership site up and running with Kim's help.

    Watch Initial Setup
  • Community
    • Engage & Learn
      • Upcoming Events
      • Courses
      • Videos
      • Step-by-Step Guides
      • Join Slack
      • Get Support
    • Blog
      • Case Studies
      • Product Comparison
      • Code Recipes
      • Release Notes
      • Migration Guides
      • All Blog Posts

    Join the Community
    Connect with other membership site creators who use PMPro to get paid.

    Join Slack
  • Pricing
Home  >  Blog  >  Login Redirection: Redirect Members to Pages Based on Their Level

Login Redirection: Redirect Members to Pages Based on Their Level

Estimated reading time: 3 minutes

TweetFacebookLinkedIn

Paid Memberships Pro sends all members to the page they were viewing before login by default. In some cases, you may want to redirect all members to a specific page after they log in, or send members to different pages based on their membership level.

This guide shows two code-based methods to set up login redirection. The first redirects all members to the same page. The second checks the member’s level and redirects them to a level-specific page.

For a no-code option, you can use the Member Homepages Add On. We share other login redirection strategies and a few other ways to set up redirects in our guide on How to Redirect Members on Login and Why You Should.

Redirect Members to Pages Based on Their Level Banner Image

Table of contents

  • Recipe #1
    • Understanding the Code Recipe (Redirect All Members on Login)
    • About the Code Recipe
    • The Code Recipe
  • Recipe #2
    • Understanding the Code Recipe (Redirect Members Based on Level)
    • About the Code Recipe
    • The Code Recipe

Recipe #1

Understanding the Code Recipe (Redirect All Members on Login)

This code changes the default login behavior for all members on your site.

It uses the login_redirect filter to control where members are sent after logging in. The first function sets a global redirect URL for all members, regardless of their membership level.

About the Code Recipe

This code uses the login_redirect filter to send all logged-in members to the same landing page after they log in.

It checks if the user has an active membership using pmpro_hasMembershipLevel(). If they do, the function overrides the default redirect and sends them to a specific page, set by home_url( '/dashboard/' ).

Before implementing this code recipe:

  • Replace /dashboard/ with the slug or path for your preferred landing page on line 18

The Code Recipe

Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

Recipe #2

Understanding the Code Recipe (Redirect Members Based on Level)

This code sets up different login redirect URLs for users based on their membership level.

The login_redirect filter runs after a successful login. The function checks the user’s membership level using pmpro_hasMembershipLevel() and returns a different landing page depending on their membership level.

About the Code Recipe

This code uses the login_redirect filter to send logged-in users based on their membership level to a specific landing page after they log in.

It checks if the user has an active membership using pmpro_hasMembershipLevel(). If they do, the function overrides the default redirect and sends them to a specific page, set by home_url( '/dashboard/' ).

Before implementing this code recipe:

  • You can tweak this code to your needs by changing the membership level IDs in the pmpro_hasMembershipLevel() checks and the URLs in the home_url() calls.
  • In this code recipe, we are redirecting users as follows:
    • Members of Level ID 1 are sent to a page at yourdomain.com/level-one/
    • Members of Level ID 2 are sent to a page at yourdomain.com/level-two/
    • Members of Level ID 3 are sent to a page at yourdomain.com/level-three/
    • All other members, as well as non-members are sent to the homepage.

The Code Recipe

Mary Job

Author: Mary Job

Mary is a Technical Support Engineer here at PMPro. She loves WordPress & Backpacking. In her spare time, she teaches digital skills and WordPress at Uwani Hub; a non-profit community project sponsored by How Do You Tech and volunteers for the Nigerian, African and Global WordPress communities. You can find more about Mary and her other works on her personal website.

View more articles by Mary Job »

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Take Free Course Now
Featured Image for Membership Site Development Course: The Basics


Was this article helpful?
YesNo
Tagged: login redirect, pmpro_hasMembershipLevel. Posted in Code Recipes, Premium Code Recipes. Bookmark the permalink. Last updated: June 17, 2025.
Post navigation
← A Spiritual Teacher Transforms Lives with “Kimspirational” Guidance and Paid Memberships Pro
Send a Different Approval Email Based on Membership Level →

Paid Memberships Pro is recommended by our customers and users

Plugin Reviews

4.3 out of 5

G2

4.8 out of 5

Capterra

5 out of 5

We’re 100% GPL

Our plugin's code is not obfuscated, runs on as many sites as you want and can be customized to fit your project's needs. We just ask that you follow the GPLv2 guidelines by applying the GPLv2 license to any altered or unaltered version of PMPro that you distribute. License Details »

GPL v2

Recent Articles and Updates

  • Banner for Paid Memberships Pro v3.5 RC
    Paid Memberships Pro v3.5 Release Candidate: Ready for Developer-Supported Production Sites
  • Andrew Lima
    How to Forward and Redirect PayPal IPN Traffic to PMPro
  • 4 Best WordPress Membership Plugins Banner Image
    4 Best WordPress Membership Plugins Compared

Platform

  • Pricing
  • Features
  • Product Comparison
  • Reviews
  • Case Studies
  • Screenshots
  • Videos
  • Step-by-Step Guides

Use Cases

  • Associations
  • Blog & News
  • Community
  • Courses
  • Directory & Listing
  • Paid Newsletter
  • Podcast
  • Videos

Add Ons

  • Free
  • Standard
  • Plus
  • Admin
  • Integration
  • Payment
  • Third Party
  • View All

Get Help

  • Support
  • Documentation
  • Download & Install
  • Hosting
  • Developers
  • Blog
  • Slack Community
  • Contact Us

Company

  • About Us
  • Events
  • Brand Assets
  • Affiliates
  • Accessibility Statement
  • Sitemap
  • Privacy Policy
  • Terms of Service
Join Our Community
Follow Us On

© 2025 Paid Memberships Pro™. Paid Memberships Pro is a trademark of Stranger Studios, LLC. All Rights Reserved.