Created
May 8, 2020 21:24
-
-
Save MaryOJob/75d311364ea188631a006a6b09ffd71e to your computer and use it in GitHub Desktop.
Removes the always redirect to Member Homepages (MH) for Members and Admins when using the PMPro MH Add-On
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 // PLEASE DO NOT COPY THIS LINE | |
/** | |
* 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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment