Notifications
Clear all

Question regarding wpforo_user_field('field')

3 Posts
2 Users
0 Likes
2,048 Views
Posts: 2
Topic starter
(@irish305)
New Member
Joined: 5 years 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: 5872
Admin
(@astgh)
Illustrious Member
Joined: 6 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
Posts: 2
Topic starter
(@irish305)
New Member
Joined: 5 years 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:
Scroll to top