Created
January 7, 2025 18:05
-
-
Save MaximilianoRicoTabo/6daedca5f2c6efe7045757adf21e3230 to your computer and use it in GitHub Desktop.
Custom function to add custom sql search where clause to the member directory search query
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 | |
/** | |
* Custom function to add custom sql search where clause to the member directory search query | |
* | |
* 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 custom_pmpro_member_directory_sql_search_where( $sql_search_where, $search_term ) { | |
//write your custom sql search where here | |
$custom_sql_search_where = ""; | |
return $custom_sql_search_where; | |
} | |
add_filter( "pmpro_member_directory_sql_search_where", "custom_pmpro_member_directory_sql_search_where", 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment