Profile field label working with WPMUDev Membership 2 Pro
-
Full disclaimer: I’m not much of a programmer; more of a front end guy who gets by on the back end with trial and error. This one is above my skill level, however.
I am using BuddyPress’ Profile Fields in conjunction with WPMUDev’s Membership 2 Pro plugin. I’ve created some new Profile Fields that I also want to be displayed on a user’s account page. I’ve found the file that needs to be updated; currently, the code displaying the default membership attributes looks like this:
public function prepare_fields() {
$fields = array(
‘personal_info’ => array(
‘first_name’ => __( ‘First name’, MS_TEXT_DOMAIN ),
‘last_name’ => __( ‘Last name’, MS_TEXT_DOMAIN ),
‘username’ => __( ‘Username’, MS_TEXT_DOMAIN ),
’email’ => __( ‘Email’, MS_TEXT_DOMAIN ),
)
);When I add new Profile Fields in BuddyPress, they show up as fields that users can edit within their profile but they don’t automatically display in this array. I can see how to add new fields to the list:
‘value_of_XXXX’ => __( ‘XXXX’, MS_TEXT_DOMAIN ),
I just don’t know how to find the value of XXXX once I have created that field within BuddyPress. I have posted the same question in the WPMUDev forum but so far don’t have an answer.
I am using WP 4.2.5 and BuddyPress 2.3.3. I am currently developing locally so I can’t send a link.
Thanks in advance.
- The topic ‘Profile field label working with WPMUDev Membership 2 Pro’ is closed to new replies.