Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dwanjuki/1b592e66730f737be5ecc8800e1be7e7 to your computer and use it in GitHub Desktop.
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
<?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