The following actions and filter hooks are available in this Add On.
do_action( 'pmpro_member_directory_before', $sqlQuery, $shortcode_atts );
Allows content to be inserted before the Member Directory content.
do_action( 'pmpro_member_directory_after', $sqlQuery, $shortcode_atts );
Allows content to be inserted after the Member Directory content.
do_action( 'pmpro_member_profile_before', $pu );
Allows content to be inserted before the Member Profile content.
do_action( 'pmpro_member_profile_after', $pu );
Allows content to be inserted after the Member Profile content.
apply_filters( 'pmpro_member_directory_display_name', $user->display_name, $user );
Modify the display name for members in your Member Directory and Member Profile.
apply_filters( 'pmpromd_user_identifier', 'slug' );
Filter to change how user identifiers are presented. Choose between slug and ID (case-sensitive).
apply_filters( 'pmpromd_profile_url', get_permalink( $pmpro_pages['profile'] ) );
Dynamically filter the profile URL. Use this filter to optionally link Directory entries to a specific Profile page per user ID or to an external URL.
apply_filters( 'pmpro_member_profile_elements', $elements_array, $pu );
Filter the elements array for the member profile.
apply_filters( 'pmpromd_member_profile_action_links', $pmpro_member_profile_action_links );
Filter which links are displayed on the single Member Directory Profile page.
apply_filters( 'pmpromd_get_display_value', $value, $element, $pu, $displayed_levels );
Filter the value of a specific element from a string of HTML.
apply_filters( 'pmpro_member_directory_sql_search_where', $sql_search_where, $s );
Allow filtering the member directory search SQL to be used.
apply_filters( 'pmpro_member_directory_sql_parts', $sql_parts, $levels, $s, $pn, $limit, $start, $end, $order_by, $order );
The $levels
parameter is a single level ID or a comma-separate list of IDs (not an array of level IDs).
The $sql_parts
parameter is an array of each section of the SQL query for building your list of members to include in the directory. The sections of the array you can modify include:
$sql_parts['SELECT']
$sql_parts['JOIN']
$sql_parts['WHERE']
$sql_parts['GROUP']
$sql_parts['ORDER']
$sql_parts['LIMIT']
apply_filters("pmpro_member_directory_sql", $sqlQuery, $levels, $s, $pn, $limit, $start, $end, $order_by, $order);
Allow filtering the final member directory SQL before users are queried.
apply_filters( 'pmpromd_user_directory_results', $theusers );
Filter the array of users returned from the query before display.
apply_filters( 'pmpro_member_directory_elements', $elements_array );
Filter the elements array for the member directory.
apply_filters( 'pmpro_member_directory_elements', $elements_array );
Filter the elements array for the member directory.
apply_filters( 'pmpromd_map_id', $map_id, $attributes );
Filter to adjust the unique identifier for the map.
apply_filters( 'pmpromd_map_failed_to_load_notice', $notice );
Adjust the notice that is displayed when the map fails to load.
apply_filters( 'pmpromd_default_map_zoom_level', '8' );
Filter to adjust the default zoom level of the map across all map instances. You can adjust the zoom level per-map by modifying the map_zoom
shortcode attribute or block setting.
apply_filters( 'pmpromd_maps_query_params', $query_params );
Filter to add query parameters or load custom libraries via the Google Maps API request.
apply_filters( 'pmpromd_default_map_start', array $default_start, $map_id );
Adjust the map starting point location. This gets automatically overridden when there are markers on the map. Accepts an array of coordinates in the format array( 'lat' => -34.397, 'lng' => 150.644 )
.
apply_filters( 'pmpromd_override_first_marker', $override_first_marker_location, $map_id );
Override the location of the first marker placed on the map. Default: false
.
apply_filters( 'pmpromd_single_marker_content', $member_array['marker_content'], $member );
Filter the infowindow HTML content for a single marker.
apply_filters( 'pmpromm_view_profile_text', 'View Profile' );
Filter to adjust the text linking to the single Member Profile page as shown in the map marker.
apply_filters( 'pmpromd_maps_geocoding_api_key', $map_api_key );
Filter to adjust the geocoding API key. This is useful if you want to use a different API key for geocoding or test a key.
apply_filters( 'pmpromd_map_styles', '', $map_id );
Filter the map styles. Map styles are passed as a JSON string and can be generated using this form.
The following actions and filter hooks are available in this Add On:
do_action( 'pmpro_member_directory_before', $sqlQuery, $shortcode_atts );
Allows content to be inserted before the Member Directory content.
do_action( 'pmpro_member_directory_after', $sqlQuery, $shortcode_atts );
Allows content to be inserted after the Member Directory content.
do_action( 'pmpro_member_profile_before', $pu );
Allows content to be inserted before the Member Profile content.
do_action( 'pmpro_member_profile_after', $pu );
Allows content to be inserted after the Member Profile content.
apply_filters( 'pmpro_member_directory_display_name', $user->display_name, $user );
Modify the display name for members in your Member Directory and Member Profile.
apply_filters( 'pmpromd_user_identifier', 'slug' );
Filter to change how user identifiers are presented. Choose between slug and ID (case-sensitive).
apply_filters( 'pmpromd_profile_url', get_permalink( $pmpro_pages['profile'] ) );
Dynamically filter the profile URL. Use this filter to optionally link Directory entries to a specific Profile page per user ID or to an external URL.
apply_filters( 'pmpro_member_profile_elements', $elements_array, $pu );
Filter the elements array for the member profile.
apply_filters( 'pmpromd_member_profile_action_links', $pmpro_member_profile_action_links );
Filter which links are displayed on the single Member Directory Profile page.
apply_filters( 'pmpromd_get_display_value', $value, $element, $pu, $displayed_levels );
Filter the value of a specific element from a string of HTML.
apply_filters( 'pmpro_member_directory_sql_search_where', $sql_search_where, $s );
Allow filtering the member directory search SQL to be used.
apply_filters( 'pmpro_member_directory_sql_parts', $sql_parts, $levels, $s, $pn, $limit, $start, $end, $order_by, $order );
The $levels
parameter is a single level ID or a comma-separate list of IDs (not an array of level IDs).
The $sql_parts
parameter is an array of each section of the SQL query for building your list of members to include in the directory. The sections of the array you can modify include:
$sql_parts['SELECT']
$sql_parts['JOIN']
$sql_parts['WHERE']
$sql_parts['GROUP']
$sql_parts['ORDER']
$sql_parts['LIMIT']
apply_filters("pmpro_member_directory_sql", $sqlQuery, $levels, $s, $pn, $limit, $start, $end, $order_by, $order);
Allow filtering the final member directory SQL before users are queried.
apply_filters( 'pmpromd_user_directory_results', $theusers );
Filter the array of users returned from the query before display.
apply_filters( 'pmpro_member_directory_elements', $elements_array );
Filter the elements array for the member directory.
apply_filters( 'pmpro_member_directory_elements', $elements_array );
Filter the elements array for the member directory.
apply_filters( 'pmpromd_map_id', $map_id, $attributes );
Filter to adjust the unique identifier for the map.
apply_filters( 'pmpromd_map_failed_to_load_notice', $notice );
Adjust the notice that is displayed when the map fails to load.
apply_filters( 'pmpromd_default_map_zoom_level', '8' );
Filter to adjust the default zoom level of the map across all map instances. You can adjust the zoom level per-map by modifying the map_zoom
shortcode attribute or block setting.
apply_filters( 'pmpromd_maps_query_params', $query_params );
Filter to add query parameters or load custom libraries via the Google Maps API request.
apply_filters( 'pmpromd_default_map_start', array $default_start, $map_id );
Adjust the map starting point location. This gets automatically overridden when there are markers on the map. Accepts an array of coordinates in the format array( 'lat' => -34.397, 'lng' => 150.644 )
.
apply_filters( 'pmpromd_override_first_marker', $override_first_marker_location, $map_id );
Override the location of the first marker placed on the map. Default: false
.
apply_filters( 'pmpromd_single_marker_content', $member_array['marker_content'], $member );
Filter the infowindow HTML content for a single marker.
apply_filters( 'pmpromm_view_profile_text', 'View Profile' );
Filter to adjust the text linking to the single Member Profile page as shown in the map marker.
apply_filters( 'pmpromd_maps_geocoding_api_key', $map_api_key );
Filter to adjust the geocoding API key. This is useful if you want to use a different API key for geocoding or test a key.
apply_filters( 'pmpromd_map_styles', '', $map_id );
Filter the map styles. Map styles are passed as a JSON string and can be generated using this form.
Get Support From Our Team of Experts
For more help with this PMPro feature, check out our Support Page with three ways to get support as a free or premium member.
Last updated on August 20, 2025