• Resolved Hari

    (@haribonda)


    thanks for an a awsome plugin, i want to force change old and new user’s display name to nickname or just the first name could you add this feature or tell me a way to manually change the code

    thanks in advance

    • This topic was modified 2 years, 4 months ago by Hari.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @haribonda ,

    Here’s the code for just first name: https://gist.github.com/kimcoleman/613b90e6ff2b092318eed48c5b6c04bf

    Once that’s code is in place whether through a custom plugin or the Code Snippets plugin, you can run the script on the Force First Last admin settings page under “General”.

    Thread Starter Hari

    (@haribonda)

    Thanks a lot, this really made my day! ??

    
    <?php
    /*
     * Change the display name to default to just the first name using the Force First Last WordPress plugin.
     * https://www.ads-software.com/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 );
    • This reply was modified 2 years, 2 months ago by Hari.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘force old and new users display name to nickname’ is closed to new replies.