latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Display User's Custom Registration Field data

Home Forums Community Forum Display User's Custom Registration Field data

This topic contains 2 replies, has 3 voices. Last updated by  Chris W 4 years, 4 months ago.

Topic Author Topic
Posted: Saturday Jul 14th, 2012 at 4:44 pm #19266

I have a custom registration field called “Company”.

I need to auto-populate forms across my site with this data. I can accomplish this by writing a filter for my forms, but I need to know the code to access the field data.

Similarly, how might I display the company name on a page (in a template)?

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Monday Aug 13th, 2012 at 3:39 pm #21911

I’m using this shortcode to display the company name in a page: [s2Get user_field="company"]

I had also installed a plugin called User Meta Shortcodes, and was grabbing the first & last names from WordPress’s user fields.

Posted: Wednesday Aug 22nd, 2012 at 2:09 am #22687
Chris W
Username: Chrisw83

Is there a way to use php for this? I have created a custom field with the id PI_DN that I need to post via php.

After some digging I found the answer.

<?php echo $my_field_data = get_user_field ("PI_DN");?>

  • This reply was modified 4 years, 4 months ago by  Chris W.
  • This reply was modified 4 years, 4 months ago by  Chris W.
Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.