Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to add custom user meta fields to registration page. I use WP multisite so I have to modify wp-signup.php.

Adding some field is easy for me(I am programmer :P).

But I have a problem with this line of code:

wpmu_signup_user($user_name, $user_email, apply_filters('add_signup_meta', array()));

I have searched all Wordpress with bash command:

find -name "*" | xargs grep -ni "add_signup_meta"

And havent found where exactly is specify add_filter for add_signup_meta.

Can somebody tell me where exactly add_signup_meta filter is located?

Or maybe where is a easier way to add some fields?

WordPress 3.2.1

PS I have tried many plugins for adding custom user fields. Only one is good choice(Cimy User Extra Fields) but unfortunately it doesnt add custom fields for registration(probably this is broken).

share|improve this question

3 Answers 3

Easiest way I know is by using Gravity Forms & User Registration add-on

share|improve this answer

I think you are probably misunderstanding that line of code. It is essentially telling Wordpress to process any filters accordingly. There are no default functions for the add_signup_meta filter but it has been put there so that we can hook onto it ourselves.

This code might help...

<?php 
add_filter('add_signup_meta', 'sb_add_signup_meta');

function sb_add_signup_meta($meta) {
    $meta['mykey'] = 'My Value';

    return $meta;
}
?>

This should show you how to hook onto that line and clarify for you that there are actually no default functions for many of the filter references that Wordpress provides us with.

thanks Sean

share|improve this answer

What I've done in the past is create my own signup page, and used wp_create_user, add_user_meta, and add_user_to_blog to process the $_POST. You could then throw in wp_mail for new registration if you want. It's pretty quick to make a custom page and gives you full control over the process

share|improve this answer

Your Answer

 
discard

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.