Created
August 14, 2020 14:05
-
-
Save JarrydLong/3ef373fbf5e8fee4139d859cd7fa8234 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* This recipe will remove the map from the directory and single profile pages | |
* when using the Membership Directory Add On | |
* | |
* 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 mypmpromm_remove_map_membership_directory(){ | |
//Removes the map from the directory page | |
remove_action( 'pmpro_member_directory_before', 'pmpromm_load_map_directory_page', 10, 2 ); | |
//Removes the map frm the single profile page | |
remove_action( 'pmpro_member_profile_before', 'pmpromm_show_single_map_profile', 10, 1 ); | |
} | |
add_action( 'init', 'mypmpromm_remove_map_membership_directory' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment