WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a custom app for a client that is based on BuddyPress and WordPress. One of the requirements is a custom registration form. To accomplish this, I have managed to hack a custom register.php together inside of a child theme which does the trick. The part where I am stuck, however, is getting BP to save my custom fields without hacking the core. I understand that I might be able to use the "user_register" hook to save the fields but I am not sure if that is the best way and if it is where in the database to store the custom fields. Can anyone point me in the right direction? Thanks!

P.S. I also need a second submit button that redirects to a different page than the normal one for further processing but I may be able to figure this out myself.

share|improve this question
up vote 0 down vote accepted

Without hacking core files your only option is to use user_register hook to save the custom fields and usually custom fields should be stored in the corresponding object meta table, meaning that if its user meta then store it in the usermeta table and if its post meta then store it in the postmeta table.

As for redirecting after the submit, that really depends on how your form works, if its the regular form then you can simply add an hidden field with the redirect value, something like:

<input type="hidden" name="redirect_to" value="http://www.domain.com/redirect_to_here"/>

but if the form is custom and not really using the built in registration form then take a look at wp_redirect() function.

share|improve this answer
Thanks. That should hopefully point me in the right direction. – Joseph Leedy Sep 11 '11 at 20:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.