Join our new community forum for support & discussion

Join Now

Home Support Themes TaskHive Try to add description in register form

Try to add description in register form

  • Author
    Posts
  • mzvdesign

    I would like to add some description under usernamen in registration form.

    What is wrong in this snippet?

    add_filter(
    	'hivepress/v1/models/user/register',
    	function( $form ) {
    		$form['fields']['username']['description'] = 'custom description';
    
    		return $form;
    	}
    );
    ihor developer

    Please try using this one instead:

    add_filter(
    	'hivepress/v1/forms/user_register',
    	function( $form ) {
    		$form['fields']['username']['description'] = 'custom description';
    
    		return $form;
    	}
    );
    mzvdesign

    Thanks for the reply, but still doesn’t work.

    ihor developer

    If you enabled usernames in HivePress settings then please try using this one, I forgot to set the function priority:

    add_filter(
    	'hivepress/v1/forms/user_register',
    	function( $form ) {
    		$form['fields']['username']['description'] = 'custom description';
    		$form['fields']['email']['description'] = 'custom description';
    
    		return $form;
    	},
    	1000
    );
    mzvdesign

    Yes, it works 🙂 thanks

Viewing 5 posts - 1 through 5 (of 5 total)

New Reply

This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.