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.

Echo Custom Profile Fields

Home Forums Community Forum Echo Custom Profile Fields

This topic contains 4 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 1 month ago.

Topic Author Topic
Posted: Sunday Nov 11th, 2012 at 5:05 pm #31263
Rami Y
Username: rami

I have a custum profile field called ‘firm_name’.

To show this field using shortcode, i use:

[s2Get user_field="firm_name" /]

For sites using remove_all_shortcodes(). How can i display this field using php code?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Sunday Nov 11th, 2012 at 5:15 pm #31264
Rami Y
Username: rami

ok,
i answered my selt.

i use:

$user_id = get_current_user_id();
$s2user = get_user_meta( $user_id, 'roh_s2member_custom_fields', true );
echo $s2user['firm_name'];
Posted: Monday Nov 12th, 2012 at 8:03 am #31295

Cool. Yeah, that’s one way. :)

There’s also an s2Member function you can use: http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

[hilite pre_code]
$firm_name = get_user_field('firm_name');
[/hilite]
Posted: Monday Nov 12th, 2012 at 8:39 am #31306
Rami Y
Username: rami

Your code is better.
;-)

Posted: Monday Nov 12th, 2012 at 6:24 pm #31374

Cool. Glad I could help. :)

Viewing 4 replies - 1 through 4 (of 4 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.