-
-
Save searchwpgists/41fa7e6f32ac6e7abb2b24e4d4c7fa34 to your computer and use it in GitHub Desktop.
Add a label to user results
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 | |
| add_filter( 'searchwp\results\entry\data', function( $data, $result ) { | |
| if ( $result instanceof \WP_User ) { | |
| $data['title'] .= ' (User Profile)'; | |
| } | |
| return $data; | |
| }, 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment