Skip to content

Instantly share code, notes, and snippets.

@MaryOJob
Created May 8, 2020 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryOJob/75d311364ea188631a006a6b09ffd71e to your computer and use it in GitHub Desktop.
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
<?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