Note: With the introduction of WP-Members 2.6, users can now create new fields and delete exiting ones using the plugin’s admin panel. That feature renders this methodology unnecessary for most users, unless you have a reason to set up custom fields at install.
The single most common question I receive about the WP-Members plugin is how to add custom fields (or change the fields that are installed). Changing the fields that are installed is a very simple process, as you will see.
The fields are stored in the WordPress database in the options table. They are stored as a single array (so that we don’t bulk up the database with multiple entries unnecessarily). This array is written to the database when the plugin is installed. It is recommended that if you are customizing the fields, you begin with a clean install. (That means that if the plugin is already installed, you should not only deactivate it, but delete it via the plugin manager in the WP admin panel. This will clean out any database entries the plugin has made.)
The install script is in the file wp-members-install.php. As with any plugin, the plugin files can be found in the WordPress plugins folder. This is found in:
/your-wordpress-folder/wp-content/plugins/
WP-Members stores all of its files in its own folder in the plugin folder, and that is where you will find the install file:
/your-wordpress-folder/wp-content/plugins/wp-members/wp-members-install.php
As an alternative, if the plugin is already installed on your system, you can use the Plugin Editor in the WordPress admin panel. In the WP Admin Menu, go to:
Plugins > Editor
In the upper right hand corner of the Plugin Editor there is a dropdown menu. Select WP-Members from the list. Then select wp-members/wp-members-install.php from the list of files, make the appropriate changes, then save by clicking “update file.”
In wp-members-install.php, look for $wpmem_fields_options_arr near the top. This is where the array values are defined. Change these accordingly based on the following:
- Order: Not used yet, but will be in the future. This will define at what point in the display order the field will appear. Since this is not used presently, you must keep the fields in the array in the order you want to display them.
- Label: This is what will display in the form next to the field.
- Optionname: This is used by the script to pass values to the script. The important thing to remember here is that you CANNOT use spaces in your definition; i.e. ‘field_name’ NOT ‘field name’. Note: this does not display to the user.
- Input type: Defines the field type. At present, fields must be text. Checkbox is being tested and should be considered experimental.
- Display: This sets the default setting upon install whether this field is displayed or not. y = yes, it is displayed, n = no it is not. Once you install, you can change this value for each field via the plugin’s admin panel.
- Required: Sets whether the field is required or not based on the same principle as above.
- Native: Not really important. The defaults are all set to tell you which fields are natively part of WP and which are not. Any custom fields you create are obviously not, but setting them to ‘y’ is not going to break the script.
You should find this fairly intuitive, just basically copy the process as it is already in the installation.
If you have already installed and activated the plugin on your system, you will also need to force the new field array into the database. This is done with a toggle at the top of the install file:
$chk_force = false;
Change this to:
$chk_force = true;
Then save the file and using the plugin admin panels, deactivate then reactivate the plugin. This will force your changes into the database. Following this procedure, it is recommended that you change the toggle back to “false” and also check your WP-Members settings for anything you may have set back to the default options through this process.
Some important notes:
While I do not think this process is that difficult, you should use these steps at your own peril – especially if you are clueless when it comes to php. If you choose to customize your installation and break it, please do not come to me and ask me how to fix it.
Also, it is highly recommended that you not change any of the WordPress native fields. Without getting into too much necessary detail, most of these are stored a certain way and the plugin makes assumptions based on names and locations in the database for these. It doesn’t mean you have to use them, and certain ones are non-essential, but do not change their optionname.
Enjoyed this article?
Don't miss a single post. Subscribe to our RSS feed!
Kristy says
Hi! First – great plugin! 2nd, as a follow-up question: When you change the custom fields in the array, do you have to make any additional changes to any other files? My issue is the custom fields appear, but when users click the Edit my Information link – the custom fields I put in, do not echo back the previously entered data.
For example – Custom field is Allergies. At registration, user enters SEAFOOD in the allergies field. This shows in the User dashboard in WP Admin.. But when user login and wants to update the profile — Allergies field is empty and does not show the previous value.
Is this due to something I messed up? Or are other adjustments needed?
Thanks in advance!
Maja says
Thanks for the wonderful plugin. But i haven’t been able to change the form’s labels. I did tried to change $wpmem_fields_options_arr but i couldn’t get it done. I went further changing the values on the database, but too couldn’t give me anything. Anything i’m missing here?
Karl W says
Is there any way to have the login widget direct a valid login to another (protected) page? It is now on an unblocked static landing page & I would prefer to have it open to the “Members Area” page on login rather than stay on the landing page.
Thanks.
Chad says
Karl,
The widget only logs in to itself. You could tweak the code, but then you do create problems in the event of an upgrade (you would have to re-do any changes you made).
Chad says
You must be missing something, but I can’t tell from the information provided.
Chad says
Kristy – I’ll need to do some testing, but the first thing to check is to make sure you do not have any spaces in the value for optionname. Labels can have spaces, but not the optionname.
Will Chapman says
I’ve looked at a lot of member management and WP-Members is the closest to what I need – thanks!
Until I read this thread I had two issues – this thread answers the first – thanks again!
I note from an earlier post that you are looking at different field types – does that include a multiple selection drop-down (or check boxes)?
Also do you have any plans to include profile fields that have been added by other plugins/themes (e.g. BuddyPress has a Profile Field feature that is picked up by some other plugins)?
Chad says
Hi Will – thanks for the comments!
Yes, I want to add drop downs to the field types. And here’s a secret – check box support is actually there, it’s just untested from the standpoint of end users customizing the fields install. I should probably add that to this post.
I like the idea you mentioned about picking up additional profile fields from other plugins. At this stage I’m not sure how I would do it, considering the way WP-Members handles it’s fields (stored in a single array). I’ve considered some other ways of doing it, but for now, this seems to be working. But I like the idea, especially with the more popular plugins like BuddyPress. I will definitely add it to the wish list.
Jamie Cutler says
Is there any way of adding a new field without having to delete everything and start over? I don’t want to have to loose the members I already have.
Chad says
It is important to point out that when you delete the plugin via the WP admin panel, you do not delete any users that have registered. The process only deletes any settings that are in the options table (the fields, the plugin options, etc). Users are in the users and user_meta table and plugin deletion does not touch those.
However, if you add/remove fields, your existing users will not have data for these new fields unless they actively change it via editing on the members page (or you add it through the user admin). This won’t effect their ability to login, but they will have empty data until it is updated.
Joe Greenwood says
Hi Chad, thanks for the plugin! I did go ahead and experiment with the custom checkbox on registration and it works just fine, as far as I can tell. One issue that doesn’t work quite right is when a user is allowed to edit their info via the “/members-area/?a=edit” page, the checkbox value switches to whatever it had NOT been previously. So, if someone registers on the website with the box checked, then goes to edit their info, they will see the box unchecked. My concern is that members will unwittingly opt-out of our marketing option because of this, but maybe I can find a fix. If you have suggestions, please share! I’m guessing you’re nearly ready to release this as a built-in feature anyway. Thanks again for the great plugin.
Chad says
Joe,
I’d like to introduce checkbox as an officially supported feature, but I’ve got a lot of considerations as far as how to make it customizable and scalable without making things too confusing or making the admin too bulky.
For now, yes, there is an easy fix. The default value that the wpmem_create_formfield function will set is either “on” (when checked) or null (or “”, when not checked). You might have noticed there is a fourth value that can be passed to the wpmem_create_formfield function, $valtochk. The default of this value is null as it is only used in the creating of a checkbox or option field (for dropdowns). When this is present, the function has two values to compare and uses the function wpmem_selected to determine if it should be checked (or selected, if it’s a dropdown).
So, here is the fix: the file wp-members-dialogs.php has a function called wpmem_inc_registration which generates the registration form and also the user update form. If you go down to where the form field is created (in the current version 2.3.2, this is line 179) you can add $valtochk to the end of the function call like this:
wpmem_create_formfield($wpmem_fields[$row][2],$wpmem_fields[$row][3],$val,$valtochk);
Then, right before this, you can define $valtochk if the checkbox is “on” with this:
if ($wpmem_fields[$row][3] == 'checkbox') { $valtochk = "on"; }
The limitation here that I have now realized for scalability purposes is that the auto-generated checkbox does not allow for defining what the check value is, such as “checked”, true, or “y”. So keep in mind that unless you make a modification to the wpmem_create_formfield, the checked value is “on”. Somewhere along the line, I am going to have to change this. So, while I try to consider workarounds that I’ve talked about when I do an upgrade, I’m not sure if that will be a scalable solution with any present customizations – so just keep that in mind.
Also, I haven’t discussed here the admin panel, which doesn’t account for field types (it doesn’t use wpmem_create_formfield at present). While I probably will upgrade the admin panel to use wpmem_create_formfield, if you want to handle that now, you could look at wp-members-admin.php and review the wpmem_admin_fields function, which is where any custom fields are placed at the bottom of the user edit panel. It’s not totally necessary, but keep in mind that based on the above mentioned workaround, any edits to a user here would need to use “on” as a checked value in the text field, or blank for unchecked.
Hope that helps!!
Jan says
Hi,
I am trying to add custom fields and i ran into some problems. After a while I figured out that I was not able to use local Swedish characeters (i.e. åäöÅÄÖ) in the description of the new field. I.e. field description ‘båt’ was not possible but field description ‘bat” was. Option table was not updated correctly. Funny thing 1. Field “First name” is translated by the localized version of WP to “Förnamn” and is stored in that way in the wpmembers_fileds option entry. But if i try to change to swedish character directly in the wpmembers_fileds entry for any non-standard WP field even then the plug-in will not work (no fields displayed at all in settings or user admin). Is this a plug-in issue or an issue with my installation? I am using Swedish WP 3.0.2 and everything else related to local characters seem to work. Any other way I can localize the plug-in. I saw in 2.4.0 that you are working on localization support.
Chad says
Hi Jan, thanks for the comments. Yes, I am working on localization support for the 2.4 release and the fields in the install process are going to be the biggest challenge. I am not totally positive that special characters are 100% compatible with the process that is in place for the fields array so I am looking into some different possibilities. Since I don’t have this totally worked out yet, I’m sorry I don’t have a better answer for you at this point, but hopefully I’ll have this worked out and resolved soon.
alan says
Hi,
I successfully installed and added 2 custom fields but they don’t show in the Edit User admin? what am I missing?
thanks
Chad says
If you are looking at a registered user that you know has filled out data in these fields, then you may not have a successful install. Double check to see if they are showing in the WP-Members settings (the place where you set required fields). If they show up there, you are ok. My guess is that you might be looking at the edit user for yourself (the admin user)? If that’s the case, it is likely you won’t see these (or any) of the extra fields unless you’ve added data to them (on a new site, you’d need to do this via the front-end for yourself).
Helena B says
Hi Chad
Thank you for a great plugin!
I have two questions for you.
1. When I try to change the label for a form field (from State to County) the form breaks. I’ve changed the label in both the DB and Install.php – not sure what I’d doing wrong. Definitely only changing the label bit.
2. Where can I track down how the forms are constructed? I’m one of those that doesn’t like tables in forms so I’d like to get rid of them if possible.
Thanks.
Chad says
Hi Helena! Thanks for the comments.
If you need to change a label, it is best to make the change to the array in the install, then re-install. BUT – and this is important – the install process, for a number of reasons, does not overwrite the settings you have if wpmembers_settings is there already. So you need a clean install. You can do this by either (1) delete the plugin using the WP admin panel, which clears out any settings the plugin has made, or (2) you could deactivate the plugin, delete the wpmembers_settings directly from the db, then activate.
I agree with you – I hate tables for forms as well. Unfortunately, with a plugin that gets used in so many different applications, I had to develop something that fits the largest number of possible scenarios. You can edit the registration table found in wp-members-dialogs.php. However, this will make upgrading more tedious as you’ll need to reintroduce your changes. (And I do have a new version coming out soon.)
Helena B says
Chad
Thanks for your reply – I’ll give that a go. I look forward to your new version.
Art Oswald says
We are a small nonprofit organization and would like to have a page for members only that has all of our contact information on it. does you plugin do that?
Chad says
Yes, Art, it does. Just set the defaults for pages and posts to be not blocked, then you can block the individual page(s) that you want restricted. The installation instructions cover this.
Pop says
Hey Chad…. great plugin.. currently using the 2.3.2 version.. n will surely use it for testing and then to my new blog 😉
Jess says
Chad – fantastic plug-in! I am currently messing around with the 2.4 beta 4 with the most current WordPress build and have had great success. One question though…
I successfully added several custom fields including a checkbox for a newsletter and everything seems to be working except that the value for the newsletter checkbox isn’t getting stored properly (unless I am missing something). The email that is sent to the admin for new user registration lists the newsletter but it’s value is blank. It’s also blank if exported out through the plugin although, again the header for newsletter is listed. Any ideas? Any help would be greatly appreciated.
Chad says
Jess – thanks for the comments and thanks for trying out 2.4. Actually, the checkbox feature kind of sneaked in at the tail end of the development process and so it could be that there are some issues. I’ll take a look and see what I come up with.
Jess says
Thank you for the help! And really this is turning into one hell of a plug-in.
Jess says
So I figured out a round about way to fix the issue. If the variable for checkbox is stored in the $wpmem_fields_options_arr it breaks, nothing gets stored if the box is checked or not. However if that is left blank and the following is used in the wp-members-dialogues.php:
if ($wpmem_fields[$row][3] == ‘checkbox’) {
$valtochk = ‘true’;
$val = ‘true’;
}
wpmem_create_formfield($wpmem_fields[$row][2],$wpmem_fields[$row][3],$val,$valtochk);
It will default the checkbox to be “on” and will properly store the selection as “true”. AND it will show properly in the new user registration email and export. The only downside is if it isn’t checked it shows as blank or null.
Hope this helps.
vivek says
thanks a lot friend !!
you saved my lot of time
Teluguhouston says
Hi,
Thanks for the great plug-in.
It was working fine all these days. I recently upgraded to Arras 1.5 and I noticed the members area is not working any longer. I deleted the old page and created a new one with the slug name Members-Area still not working. Deactivated and activated many times. Any help or direction?
Regards
Joe Greenwood says
Jess! You’re a life saver! Thanks so much for the wp-members-dialogues.php fix for checkboxes … it works for me now.
$valtochk = ‘true’;
$val = ‘true’;
And, thanks Chad, for keeping up with this plugin … I’ve made a few modifications to fit VG’s needs but couldn’t have done it without you. Thanks!
Chad says
thanks!
Dale says
I am still trying to get a handle on WordPress. So, if this seems like a simple question, I apologize. Where exactly is the wp-members-install.php file? I have looked everywhere that I could think of. Pointing me in the right directly would be greatly appreciated.
Thanks
Chad says
Thanks Dale for your question – that may seem rudimentary to some, yet monumental to others, so I have updated the post accordingly.
Dale says
yu da man 😉
Dale says
OK. I have added custom text and checkbox fields. However, I need to make a couple adjustments in the way the fields are displayed.
1) Add the question text before the checkbox options (for example)
What color is the sky?
Red
Green
Blue
Yellow
2) To put the question and options all on one row (for example)
What color is the sky? Red Green Blue Yellow
Are either of these possible? I tried messing with the php code a bit but did not get anywhere.
Thanks for the help
Chad says
Dale – well, checkboxes are possible, but this example would be more suited to a radio button group. With checkboxes, more than one selection is possible, but with radio groups, only a single option can be chosen. I am working on radio button support, but at present, that’s not an option. Implementing checkboxes is commented in the install file. Putting it on a single row may be possible with some CSS.
Dale says
Chad.
Thanks for the response. I have two different set of fields, one could use radio button option if it were available but the other needs the checkbox. However, checkbox can be used for both for now. I am not comfortable enough to mess with CSS yet so placing them in the same row will have to wait. The other element I am unclear about is how to integrate the actual question(s) text into the registration form before the checkbox options, i.e., the “What is the color of . . .” question. Suggestion?
Chris says
Hi, is it possible to add an “Upload Resume” field on the registration page and how much do you charge for that? Just a simple add/remove features. And allows the admin to view/download the files when logged in.
Chad says
Hi Chris – I’ll need to get back to you on that as I’m not sure how I would go about putting the actual upload feature into the process.
Ivan Bakran says
Hi
I like your plugin, it is almost what I needed except for one thing:
I’d like to add custom fields and let registered users have the ability to update their own information when they are logged in to the page.
I managed to add a few custom fields. Then I registered a new user and populated the custom fields with data. But when I logged in to the site as the new user and went to the new users profile setting page the custom fields didn’t appear.
Is this possible to fix?
Chad says
Sounds like you probably put a ‘y’ in the final value of the array which indicates to the plugin that it is a native WP field. For any custom fields, this final value should be ‘n’. The plugin does not display the native fields in the users profile page because they are already displayed there by WP.
BTW, I just finished version 2.6 and am finalizing the testing. This new version adds capability to add/delete fields and change the field order (among other additional features).
Ivan Bakran says
It was the ‘y’ alright… Thanks, and cudos to you Chad!
I’m looking forward to the next version.
Ruthie says
Hi Chad
Thank you for this plugin.
Quick question: I include a description of what we want included in the Biography field. The way I do this is to go into wp-members-dialogs.php and through trial and error figure out where to put the description. Every time there is an update I naturally need to do this again. This tends to be a long and arduous process of trial and error. Especially with the change from table to php format (actually both were arduous).
This is the site
http://www.nlccenter.com/blog/?page_id=6
I was using the TOS but I couldn’t figure out how to get the description under the Bio field and above the the TOS so I just removed it. Any suggestions for a better way of doing this. I am getting reluctant to update to a new version of the plugin.
Thanks
Sam says
Hi Chad.
Did you ever implement support for Select form elements? I don’t see it on the newest release and wonder what happened to this.
Thanks!
Chad says
Hi Sam – it is on the project list. I am working on an incremental release 2.6.3 and it might be squeezed into that.
Sam says
Great. Something (else) to consider is allowing a multiple-select, as opposed to a single value. I am specifically using this plugin in conjunction with Salesforce and have done a bit of modification to capture the registration post into Salesforce at time it is entered. So far, I have just had to modify some of the files manually, but it is mostly doing what we want it to do.
In other news, I changed the “forgot password” routine to just ask for an email rather than email+username. I replaced
$user = get_userdatabylogin($username);
with
$user = get_user_by_email($email);
and carried on normally after that. Do you see any issues with this?
Thanks.
Chad says
Thanks Sam – I’ll consider that going forward. It will probably start with a simple dropdown just to get it in there, but will expand from there.
With the password reset, if the array keys returned for get_user_by are the same as get_userdatabylogin (and I think they are), you should be fine. But I would double check to make sure.
Mike says
Did this get resoloved as I am interested in you plugin but the user needs to be able to change there information and see the information they used at registration…? Thanks!
Chad says
Mike – thanks for your question, users have always been able to see the information they used at signup and also update it. How to set this up is clearly outlined in both the Users Guide and the Quick Start Guide, both of which are linked to on http://butlerblog.com/wp-members. That would be a good place for you to start.
Ivy says
Hi Chad,
Thank you for this plugin, this really helps. I have one quick question. I want a dropdown field in my registration form, so I uncomment the lines about how to add dropdown in wp-members-install.php but it doesn’t show in the backend. Can you help me with this? Did I miss something?
Thanks,
Ivy
Chad says
So the question would be, is it showing on the front end? If it’s not showing on the front end or the back end, then it didn’t install correctly. If the plugin had been previously installed, you also need to follow the instructions above to force an install.
Angela says
Hi,
I’m very excited to try this plugin! Wondering if it’s possible to add a custom field where someone has to enter an invitation code in order to register.
In other words, I don’t want just anyone to be able register. This is a doctor only site and registration is by invite only… is there a way to have registrants enter a code that is given via email during the registration process? The “Membership” WP Plugin has this functionality… wondering if wp-Members does also…
If not, can I use the Sabre plugin or some similar plugin in tandem with wp-Members to protect site registration?
Thank you in advance for your time!
~ Angela
Rez says
Hi Ivy,
Have you find the solution for the dropdown field? If you do, could you please tell me how you find it out.
Chad says
Hi Angela – thanks for the comments. There is no allowance for an invitation code at this time, but that is a good idea that I’ll need to add to the project list. Unfortunately, I’m not familiar with the Sabre plugin so I can’t really give you any insight into integration (although the WP-Members registration process is self contained so without directly modifying the code, I don’t think that it will).
Ash says
Hi,
How can we change the password so that it is not auto generated, but it set up by the user in the form?
Any Ideas?
Ash
Chad says
After a successful registration, a user can login and set their password to whatever they want. The purpose for autogeneration is for validation – the registrant must provide at minimum a valid email.
It could be changed from this process, but you need to make several modifications to the core which is not recommended.
Angela says
Hi Chad,
Thanks for your reply. The Sabre plugin didn’t work out the way I had hoped. It didn’t integrate smoothly with your WP-Members plugin. Unfortunately, registration by invite only (needing a special code to prevent just anyone from registering at the site) is critical for the site I’m building… I couldn’t find any plugins or combination of plugins that offered exactly what I needed and many didn’t even work! So I ended up scrapping WordPress and going with Drupal.
If you ever do decide to offer an invitation code option as part of your plugin, please do let me know! I like everything else about the plugin you have to offer! It was just missing that invite code. =)
Thanks again!
~ Angela
Victor says
When i click on register it doesnt take me anywhere. It’s like if the registration link is dead. What am i doing wrong? Please help.
Chad says
You haven’t really provided any information that would allow me to give you an answer. Where on the page is the link that you are referring to (is it part of the plugin)? What is the text of the link? What is the URL the link is pointing to? Have you set a registration page in the plugin settings? Has that page actually been created/setup? Do you have a link to an example of what you are describing?
Pam says
I want to change the dialog message when a user tries to login with the incorrect username or password. I thought I had found it in the wp-members-dialogs.php file under “function wpmem_inc_loginfailed()” but when I changed, saved and uploaded there was no change to the message. I also changed the height of the dialog box thinking maybe it didn’t have room to display but that didn’t fix it either. This is a site that members already had registered but now need to establish new usernames & passwords. I want to add a message that they will need to re-register on the new site. Thanks for any help you can give me.
Chad says
The majority of the dialog messages are editable in the plugin’s admin panel. If you want the message to display where the login/registration goes, update the dialog for restricted posts (the first in the list) accordingly. I would highly advise against making changes directly to any of the core files.
Victor says
Hi Chad,
I am new to this so I apologize for sounding like a noob.
The website is thermgl.com
I created a page for registration and under the wp-settings i where “register page url:” i put http://thermgl.com/registration.
what do you mean what is the text link?
Please help.
Thanks in advance!
Chad says
Victor – it’s no problem sounding like a noob, but regardless of whether it’s WordPress or anything else, when asking for support, the more information you can provide at the outset, the better. It makes it much easier to give you some direction.
I can see that you have set up a registration page. I can also see that you have this correct in the settings because when I look at the WP-Members sidebar widget on your home page and click “register,” it goes to the correct page. So that ultimately brings us back to the question what is the text of the link you are clicking that you are saying doesn’t take you anywhere. And what is the location that link is supposed to be directing you to (shown to you in the footer of your browser when you mouse over a link)? If it’s the forum that you are talking about, then you need to track that down in the forum. The only registration links that WP-Members puts in automatically are in the login forms that it generates and that link information comes from the setting we already mentioned that you have correct. Anything else would be outside of the plugin.
Victor says
Chad,
i stayed up late last night reading your quick guide and figured out how to correctly install the plugin and create the page.
The text link i was referring to was the “register” link. Now when i click on register it does take me to the register page but nothing is lined up and it looks horrible.
Is there anyway to adjust the columns and make it look nice and clean?
Thanks in advance!
Chad says
Hi Victor – I’m not sure how familiar you are with CSS, but that’s basically a styling issue. There may be some inherited elements from other stylesheets that you’ll need to define and create a custom stylesheet for the plugin. http://butlerblog.com/2011/07/25/customize-the-wp-members-stylesheet/ will get you started with how to set up a custom stylesheet for the plugin. As to how to customize it, because that can vary from user to user depending on your theme and other plugins, you will need to work on that.
If that turns out to be too much of a challenge (depending on your familiarity with CSS), then you might just try changing to use the table-based legacy forms in the plugin’s settings. These are less customizable, but will generally work well in most situations.
jeffry says
Hi Chad,
first of all, your plugin saves me alot of sweat! it’s a really nice plugin. But i want to make a group of checkboxes, i already select the ‘checkbox’ type and insert the value, but how do i add the label for it?
Say i want to make a group of ‘hobbies’, how do i make them like: ‘checkbox’ – sports, ‘checkbox’ – games, bla bla bla
thanks for the enlightment Chad!
Chad says
Thanks for the comments. If they are checkboxes (there is not currently radio group support), then the best way to do it would be with CSS styling. Each form element gets an ID. Handling the layout with CSS would be the best way. Here is some insight on setting up a custom stylesheet to start.
The other possibility would be to create your own form. If you are handy with PHP and/or HTML, you could plug the function wpmem_inc_registration_NEW (information on WP-Members pluggable functions here). Note that if you set your form elements and don’t plan on changing them, you could hard code most of the form into this function rather than using the php loop, etc. However, note that there are probably going to be some changes in this area of the plugin in the near future (2.7 won’t touch it, but possibly later) and even though pluggable functions help keep you from having to re-do such hacks, you do need to monitor the customized functions when new versions come out to make sure customizations are still compatible.
Kevin says
Hi, great plugin, better than ones I paid a lot for.
I’m wondering how I can change the titles of the login and registration boxes from Userlogin/New user registration to something custom. Thanks.
Chad says
There is a pluggable functions process for customizing various functions. The function that generates the forms are in wp-members-dialogs.php and are pluggable.
Kevin says
Great, I found it, thanks a lot Chad.
Rob says
Hi Chad,
Thank you for the plugin, it works great.
People ask me if I can change the labels to Dutch (Voornaam First Name)
Is this possible without reinstalling?
Kind regards,
Rob
Chad says
Hi Rob – you won’t have to do a full reinstall, but you will need to force some translations into the database (described here: http://butlerblog.com/2011/07/13/forcing-translated-field-names-when-using-translation-files-with-wp-members/). This process will overwrite any existing settings you have for the plugin so if you have changed anything from the defaults, you’ll need to update those afterwards. Note: this process only effects the settings (options, fields, dialogs, emails), but it doesn’t effect anything outside of what is in the plugin’s options panel, such as users and content data.
Rob says
Thank you very much, it worked!
Rodwin says
Hi there! thank you so much for this wonderful plugin. Please help me with my problem regarding adding members. My client want me to add their existing 11 thousand members to wp-members database with information. How can i add BULK members in wp-members database with their corresponding information like age, gender, birthday etc. Is there a way i can add it as csv file to database or any recommended plugin. Please kindly help me.
Chad says
With a list that large, I would highly recommend a direct import via MySQL. You need to be familiar with the WordPress database structure (specifically the wp_users and wp_usermeta tables, http://codex.wordpress.org/Database_Description). You’ll need to know how to do SQL joins for the meta data. Also, you should be aware that you could run into challenges with passwords. WP stores passwords as PHPass hashed. If an MD5 hash is imported, that’ll work too, as WP will simply change it to PHPass when the user first logs in.
Sarah Parisi says
Hi,
I have been trying to use this plugin and this is a great plugin for blocking posts . I have a simple (maybe stupid) question. In my blog, are new users are created by me (upon user’s request email). I create a new user, but then I go back to his profile (to fill out his other details), but I see some fields under “WP-Members Additional Fields” . I don’t worry about TOS field, but what is the purpose of the field ” Activate this user?” ? Also, if I check this field, it sends out an email automatically to the user. How can I stop this email? Please let me know. Thank you for the great plugin.
Chad says
The activate user process is for if you want registrations to be approved by you. If you are handling registrations yourself, then you don’t need that. Just turn off registration (in the plugin options) and don’t set up a registration page.
Marcelo Paoli says
Hi Chad, i’ve just noticed that in the back end the custom fields appears in the edit-user screen, but not in the add-new user screen. I’ve searched thru the website for a workaround, but didn’t find anything. Do you know of some way i could show the fields, or manually hack the fields in the user-new.php?
Thanks.
Chad says
That’s actually something I’ve wanted to take care of for quite some time, but I don’t know of a way to hook into that page (there is nothing currently documented). I would highly advise against hacking the WP core page directly – you could either create problems or you’ll need to update in the event of an upgrade (and not keeping up with WP updates is a good way to get hacked these days). I would suggest that if you are adding users manually, that you either do it on the front end, or add them via the backend, then update fields on the user profile page.
wasim says
Hi chad,
I have my own custom field set for registration form, and now i want to extract the value of that custom field , how can i print the array?
i want to record the url of the registration page and add it as a custom field, so when user is approved and try to login , after successfull login the user will be redirected to that url he signed up for.
Thanks
Chad says
Hi Wasim – the url is actually recorded in the usermeta key wpmem_reg_url. You can retrieve the value of any meta field (where any of the custom fields are going to be stored) with the WP function get_user_meta (see: http://codex.wordpress.org/Function_Reference/get_user_meta).
Marcelo Paoli says
I was trying to create a menu item (like add new wp-member) in the back-end with a page that contains the wp-members front-end form, that way i would’nt need to hack WP, but instead create wp-members own add-new members. but i got stuck somewhere in the code. The problem is that when i’m logged, it doesn’t show the form, it returns the “You’re already logged in as ….”. Don’t know if that approach would work, as i also would like to set the users password manually.
wasim says
Thanks Chad,, working like a charm, sorry for the silly question thou 🙂
Chad says
Actually – that was a really good question!
Phill says
Hi Chad,
The plugin is amazing, great job!
I’m wondering how I can change the text “Please indicate that you agree to the TOS”? (or add my own to a new checkmark)
I would like it to say something like “Clicking ‘Agree to Needledrop’ signifies your acceptance to the terms of this Needledrop Agreement.”
If possible I would also like to have people agree to our “NeedleDrop Agreement” first before proceeding to the registration page, and would not be able to access our registration form unless they click agree, is this possible?
Thanks Chad!
Phill
Chad says
Hi Phil – there is actually a new filter being added in the next release that will allow you to customize the TOS link. I know that doesn’t help you today, but if you look at the plugin upgrades, I tend to get something out with additional features every few months.
As far as having them agree to the agreement before accessing the registration page, that’s something that could be done, but detailing it would be beyond explanation here. There are filter hooks for the login and registration forms, so you would need some knowledge on using WordPress hooks. Essentially, an outline of how you could use the filter wpmem_register_form would look something like this:
Phill says
Wow Chad, Thank you very much for the detailed explanation, I will definitely be waiting for the next release with great anticipation.
Thanks again!
Phill
Phill says
Chad,
For the mean time, until the next release is there any way possibly in the code to have the TOS link to a separate page I’ve created?
unfortunately I need to add the current date PHP code to the TOS, in the dialogs setting section the TOS only supports simple html so I’ve created another page altogether, I just need to link to it.
Is there any way?
Also, has anyone had any problems with the lining up of the boxes that you know of? any suggestions on what I should take a look at in the CSS?
Thanks Chad,
Phill
Chad says
Yes, you can actually use the wp-members shortcode for that. The format for the TOS is [wp-members page=”tos” url=”http://yourdomain.com/your-tos-page”] and you would put this in the TOS dialog field in the plugin settings.
Phill J Smith says
Thx Chad! Your the man!!
Phill
Pam says
I can’t seem to figure out where to enter text for a dropdown list on a custom field. I have created the custom field, but where do I enter the options for user to select?
Chad says
That needs to be done at the time you create the field in the box provided (“For dropdown, array of values:”). There is a link to instructions for more information right next to the box.
Brian L says
Hi Chad,
Great Plugin, help keeps our users under control!!
I am using two additional fields that are configured as dropdown, my question is, can the dropdown list be updated without having to delete the field and re enter a fresh list of options?
We are using these two fields for holding version numbers of users software. I use dropdowns so it make filtering easier, and the data collected is consistent. Also if I do have to delete and start again with new items in the list, do I also loose all my previous data collected?
Thanks in advance
Brian L
Chad says
Hi Brian – at some point, I will get an edit option for custom fields. I haven’t gotten to that yet because it’s a significant amount of programming overhead. Before I added the dropdown option, it was just as easy to delete/add as it would have been to update. Now that I added the dropdown feature, for users that might be adding something to the list every so often, I really do need to add an edit feature, so that will be coming at some point in the near future.
So… you do need to just delete and add new for now. However, that will NOT delete any data collected. Deleting the field will only delete the field itself, not any of the user meta that is stored.
Hope that helps!
emmanuel says
Hi Chad, you’ve done a really great job with this plugin its excellent so far, I only have one problem,
I installed the plugin and its very good but the thing is when I created a user(subscriber) it gives the user access to my wp-admin dashboard and I dont want that, I created the members page and set the custom field as unblock and set the value to true but it still gives the user access to my wp-admin dashboard.
Thanks
emmanuel says
or could it be because I’m still running on localhost? I haven’t hosted the site online yet
Report says
Hello, can I ask you how can you print in the .php template the value of an extra field added? Actually, if I have added the “Full address” / “full_address” field in the registration process, which is the variable to print it?
Thank you!
Chad says
Extra fields are stored as user meta values. They can be used with the field shortcode (http://rocketgeek.com/plugins/wp-members/users-guide/shortcodes/field-shortcodes/) or retrieved with the WP function get_user_meta (http://codex.wordpress.org/Function_Reference/get_user_meta)
raja says
sir how 2 add date of birth Fields …
Kevin Ross says
Hi Chad,
I am using WP-Members plugin Version 2.7.7
Can I re-align the Fields in the registration form. Currently I have 12 custom fields and they all appear one after another in separate rows. I want to have at-least two fields per row, can you explain how I can do that?
Currently it appears..
FirstName:——
LastName:——
City: ——
State:——
And I wanted them like..
FirstName:—— LastName:——
City:—— State:——
Thank you
Keviz
Chad says
There is not any built-in validation for that. There are ways to use custom validation, but unfortunately, I have not been able to write any documentation on that. when I do, it would be posted at rocketgeek.com (which is the support site for the plugin).
Chad says
You would need to do some significant CSS acrobatics and/or filter the generated form using the wpmem_register_form filter. While I don’t have anything specific in that regard, this filter hook and others are documented at rocketgeek.com (the support site for the plugin): http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/
Report says
Thanks Chad, I’ll try that!