Notifications
Clear all

Hide User Custom Fields data

3 Posts
2 Users
0 Reactions
1,191 Views
Posts: 2
Customer
Topic starter
(@topiclodge)
Member
Joined: 5 years ago

Additional question for this:

how is it possible to hide the date from the user himself. 

I need some user-information just for registration process. First idea was to send the data by registration-mail to the Admin, but that function is not available. Second idea was to show the data in the users profile, but just to the Admin, not to the user. Also not working.

CK

2 Replies
Astghik
Posts: 6149
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi @topiclodge,

Thank you for using the "wpForo User Custom Fields" add-on and for contacting us.

I'll ask the add-on developers and let you know if it possible or not. 

Reply
Astghik
Posts: 6149
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

@topiclodge,

I'm really sorry, but the add-on doesn't have such feature.

Please follow the steps below to get it resolved in your case:

1. In your active WordPress theme create a new folder named /wpforo/

2. copy: 

wp-content/plugins/wpforo/wpf-themes/classic/profile-home.php

to: 

wp-content/themes/yourtheme/wpforo/profile-home.php

3. In the copied file find the <?php wpforo_fields( $fields ); ?>  line and add the following code before or after it (as you like):

image
<?php if( is_super_admin() ) echo wpforo_member( WPF()->current_object['userid'], 'FIELD_NAME' ) ?>

The red marked code should be changed. Please use the value you've got from the "Filed name in form" option.

Field name in form

In this case, the information will be displayed on the profile page and will be visible only for admins.

Reply
Share:
Scroll to top