Question regarding wpforo_user_field('field')  


irish305
Posts: 2
(@irish305)
New Member
Joined: 9 months ago

I'm messaging you on behalf of a client of mine who has purchased the Custom User Fields add-on.  I am trying to  integrate some of the custom fields that we have added to their site - and all I have found is this php code:

<?php wpforo_user_field('field') ?>

The problem is that it displays the field info for the person visiting the site, I need a way to display the info for the member in the member loop..

<?php wpforo_user_field( $userId, 'field' ) ?>

I have tried the code above (after reading another post on this forum) with no luck, does that function have such capability? If not, can you point me in the right direction?

 

 

 

2 Replies
Astghik
Posts: 3480
Admin
(@astghik)
Support Team
Joined: 2 years ago

Hi @irish305,

You've changed the parameters position in the code, the first one should be the 'field', not the 'userId'

<?php wpforo_user_field( 'field', $userId ) ?>

Here you can also find a lot of useful information: https://wpforo.com/docs/root/addons/wpforo-user-custom-fields/

Reply
irish305
Posts: 2
(@irish305)
New Member
Joined: 9 months ago

just so you know the correct way to enter the user field in other wpforo template files is:

 

<?php wpforo_user_field( 'field_name', $member['ID'] ); ?>
Reply
Share:
Green
Default
Pear
Black Emo
{green}:grinning:
{green}:wink:
{green}:face:
{green}:inlove:
{green}:sweaty:
{green}:surprised:
{green}:lovekiss:
{green}:laugh:
{green}:formalsmile:
{green}:displeased:
{green}:cool:
{green}:resent:
{green}:nerd:
{green}:screaming:
{green}:amazed:
{green}:sad:
{green}:deceitful:
{green}:starryeyes:
{green}:evil:
{green}:shocked:
{green}:tears:
{green}:sulky:
{green}:smile:
{green}:vomited:
{green}:hi:
{green}:afraid:
{green}:crazy:
{green}:rabid:
{green}:fighting:
{green}:nonoise:
{green}:blushed:
{green}:idontknow:
{green}:scared:
{green}:razz:
{green}:kiss:
{green}:eat:
{green}:shutmouth:
{green}:gape:
{green}:suspicious:
{green}:laughingoutloud:
{green}:bruise:
{green}:crying:
{green}:pray:
{green}:serious:
{green}:excitement:
:)
:d
:wink:
:mrgreen:
:neutral:
:twisted:
:arrow:
:shock:
:???:
:cool:
:evil:
:oops:
:razz:
:roll:
:cry:
:eek:
:lol:
:mad:
:sad:
:!:
:?:
:idea:
:hmm:
:beg:
:whew:
:chuckle:
:silly:
:envy:
:shutmouth:
{pear}:happy:
{pear}:smile:
{pear}:laugh:
{pear}:laughingoutloud:
{pear}:crying:
{pear}:exhausted:
{pear}:nerd:
{pear}:surprised:
{pear}:veryhungry:
{pear}:wink:
{blackemo}:laughtertotears:
{blackemo}:gift:
{blackemo}:love:
{blackemo}:inlove:
{blackemo}:shamefaced:
{blackemo}:heart:
{blackemo}:crazy:
{blackemo}:anguished:
{blackemo}:bruise:
{blackemo}:easymoney:
{blackemo}:exhausted:
{blackemo}:vampire:
{blackemo}:shutmouth:
{blackemo}:wink:
{blackemo}:carnival:
{blackemo}:flowers:
{blackemo}:hotdrink:
{blackemo}:party: