• Resolved riatech

    (@riatech)


    Hi,

    Can anyone help me by providing the code to:

    1. Remove or hide last name field. So only First name is required.
    The first name field will equivalent to previous first and last name field space combined

    2. Change ‘First Name’ label to ‘Full Name’

    Really appreciate if someone can help me on this.

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi there,

    The last name field isn’t required at all, so your #1 should already be resolved.

    Regarding changing the “First Name” field, this snippet should do it for you:

    function my_give_text_switcher( $translations, $text, $domain ) {
    	
    	if ( $domain == 'give' && $text == 'First Name' ) {
    		$translations = __( 'Full Name', 'give' );
    	}
    	
    	return $translations;
    }
    add_filter( 'gettext', 'my_give_text_switcher', 10, 3 );

    If you need guidance implementing custom PHP functions on your website, we have this guide here: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Guide to remove last name field and change first name label’ is closed to new replies.