What you will need to do is first create a bp-custom.php file (make sure you add the opening and closing tags at the top and bottom ) and put it in your plugins folder, then paste the code between the php opening and closing tags and save.
——
I am really confused.
I created a ‘bp-custom.php file’. Do I copy and paste the code you posted above inside that file and then upload to plugin directory? I am not that experienced so please be as specific as possible.