Simple Membership Plugin › Forums › Simple Membership Plugin › Add user meta to registration form.
- This topic has 3 replies, 2 voices, and was last updated 10 years, 10 months ago by
mariah.
-
AuthorPosts
-
January 20, 2016 at 5:37 pm #4936
mariah
ParticipantI am helping a local Non-Profit set up a website. I am not a professional web developer. I am using this plugin for donation levels. I have a page for “friends of” and I have some very basic code that populates everyone in each membership in the correct columns. This is working great!
Here is my issue. The non profit helps local businesses and I want to display the business name rather than the first and last name of Business donors. I have written the code and it works but I have to have the user meta data in the user meta table of wordpress. I can manually add it, but I would much rather it get added during the registration process so the name appears immediately after donation.
I see you have an plugin for editing the forms but I cannot tell from the description if it allows custom user meta or not. If so I am willing to pay for it, if not can someone point me to the current folder location and file name of the registration form. I don’t think my coding skills are anywhere close to where they need to be to edit it, but I would like to look at it and see if I can figure it out.
January 21, 2016 at 5:10 am #4943admin
KeymasterWe prefer to keep the operation and data of this plugin confined withing this plugin. This keeps things separate and simple.
So we have no plans to pollute the core WP User records with meta data and stuff.
If you need to write custom code that reads member data and does something with that data, then the preferred way is to read the data from this plugin.
All the profile data is kept within the members table of this plugin. You can retrieve a member’s profile (or any particular info of a member) using simple PHP code. There are some examples in the following documentation:
https://simple-membership-plugin.com/simple-membership-miscellaneous-php-tweaks/January 21, 2016 at 3:33 pm #4955mariah
ParticipantThank you for the info. I am not a coder at all, so please excuse my stupidity. I can see from that link how you get specific information for a specific member, but I can not figure out how to get information for all members of a specific level. This is the code I am currently using to get the information from the users table in wp.
<?php $blogusers = get_users( 'blog_id=1&orderby=nicename&role=my-role-name' ); // Array of WP_User objects. foreach ( $blogusers as $user ) { echo '<span>' . esc_html( $user->first_name ).' '. esc_html( $user->last_name ).'</span>'. '<br>'; } ?>January 22, 2016 at 3:11 am #4970mariah
ParticipantI am very slow at this, but after a whole day spent trying to figure it out I have succeed in getting the information I need out of your tables!
So I will purchase the form editor.
Here is my next question. Is this plugin compatible with woocommerce? If so I might get the 5 site license, because I can see uses for this on my own site as well.
-
AuthorPosts
- You must be logged in to reply to this topic.