Home > other >  How to override the screens/register.php file in buddyboss?
How to override the screens/register.php file in buddyboss?

Time:02-10

I have a child theme from buddyboss. And I want to customise the error text messages. So I found that in screens/register.php you can change the error text messages:

//Voornaam
        if (empty($_POST['field_1'])) {
            $bp->signup->errors['field_1'] = __('Voer uw voornaam in.', 'buddyboss');
        }

But of course I don't want to edit the original file. So how to override the file: screens/register.php in the child theme?

Thank you

I try it in the functions.php of the child theme. Like this:

 apply_filters('bp_members_signup_error_message', '<div >' . 'wrong name' . '</div>' , '#field_1');

Because the name of the field is field_1. But the message is not shown.

CodePudding user response:

  •  Tags:  
  • Related