Created
December 15, 2017 14:37
-
-
Save andrewlimaza/5c526c1c815c5d01e42f71b9da2bdc98 to your computer and use it in GitHub Desktop.
Remove homepage replacement for Member Home Pages Paid Memberships Pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes the always redirect to member homepages. Only allows login redirect functionality. | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function remove_memberhome_pages_redirect(){ | |
remove_action('template_redirect', 'pmpromh_template_redirect_homepage'); | |
} | |
add_action( 'template_redirect', 'remove_memberhome_pages_redirect', 5 ); |
This didn't work as of March 2019. Any suggestions? Did the action change with an update?
@lexinamer I have tested this and it still works. I would check to see if your other plugins or theme is doing a template redirect for similar functionality.
Still works
This recipe is included in the blog post on "Let members access your original homepage when using the Member Homepages Add On." at Paid Memberships Pro here: https://www.paidmembershipspro.com/let-members-access-your-original-homepage-when-using-the-member-homepages-add-on/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked great, thanks!