Created
May 18, 2021 13:41
-
-
Save kimcoleman/613b90e6ff2b092318eed48c5b6c04bf to your computer and use it in GitHub Desktop.
Change the display name to default to just the first name using the Force First Last WordPress plugin.
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 | |
/* | |
* Change the display name to default to just the first name using the Force First Last WordPress plugin. | |
* https://wordpress.org/plugins/force-first-last/ | |
* | |
* 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. | |
*/ | |
function my_ffl_display_name_just_first( $display_name_order, $first_name, $last_name ) { | |
$display_name_order = array( $first_name ,'' ); | |
return $display_name_order; | |
} | |
add_filter( 'ffl_display_name_order', 'my_ffl_display_name_just_first', 15, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment