/redirect_non_members_to_levels_page.php
Forked from andrewlimaza/redirect_users_to_a_new_page.php
Last active May 16, 2020
Redirect non-members to the Membership Levels page in PMPro if they do not have a membership level.
<?php | |
/** | |
* Redirect non-members to the Membership Levels page if they do not have a membership level. | |
* | |
* 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. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* | |
*/ | |
function redirect_non_members_to_levels_page( $url ) { | |
$url = pmpro_url( 'levels' ); | |
return $url; | |
} | |
add_filter( 'pmpro_account_preheader_redirect', 'redirect_non_members_to_levels_page' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment