Forked from JarrydLong/mypmpromm-remove-map-directory-pages.php
Last active
January 25, 2024 13:47
-
-
Save dwanjuki/1b592e66730f737be5ecc8800e1be7e7 to your computer and use it in GitHub Desktop.
This recipe will remove the map from the directory page when using the Membership Directory Add On
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 page | |
* 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 ); | |
} | |
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