Notifications
Clear all

Script Unlink user Display Name and About Me

5 Posts
2 Users
0 Likes
442 Views
Hype Matrix
Posts: 72
Topic starter
(@hypematrix)
Estimable Member
Joined: 1 year ago

Hello,

Is there away to unlink user Display Name and About Me from the website?

For example when I change the Display Name and About Me section on the forum it also changes it in other places on the website and I would like to keep them separate?

Thanks

4 Replies
Robert
Posts: 9707
Admin
(@robert)
Support Team
Joined: 6 years ago

Hi @motorhype,

I'm sorry, but there is no way to unlink them.

As an alternative solution you can remove the Display Name and About fields from Forum Account fields and prevent them to edit that data. You should put this hook code in the functions.php file of your current WordPress active theme or use the Code Snippet plugin:

function wpforo_custom_remove_user_fields( $fields ){
$remove_fields = array('about', 'display_name');
if( !empty($fields) ){
foreach( $fields as $r => $rows ){
foreach( $rows as $c => $cols ){
foreach( $cols as $f => $field ){
if( $field && in_array($field, $remove_fields) ){
unset($fields[$r][$c][$f]);
}
}
}
}
}
return $fields;
}
add_filter( 'wpforo_get_account_fields', 'wpforo_custom_remove_user_fields');
Reply
2 Replies
Hype Matrix
(@hypematrix)
Joined: 1 year ago

Estimable Member
Posts: 72

@robert

Thank you for getting back to me, I don't really want to remove them.

If I brought the User Custom Fields addon, could I remove the "About Me" section using code and then create a new section similar but call it something else maybe "About"? and then remove "Display Name" with code and make a new section called "Name" and then use code to display is where "Display" Name used to be?

If this would work, could you please provide the code and I will purchase the addon?

Or if you have any other ideas please let me know.

Thanks

Reply
Hype Matrix
(@hypematrix)
Joined: 1 year ago

Estimable Member
Posts: 72

@robert Could you please let me know a.s.a.p because I would like to buy a couple of addons and need to know weather or not to also buy the Custom Fields addon?

Reply
Robert
Posts: 9707
Admin
(@robert)
Support Team
Joined: 6 years ago
Posted by: @motorhype

If I brought the User Custom Fields addon, could I remove the "About Me" section using code and then create a new section similar but call it something else maybe "About"? and then remove "Display Name" with code and make a new section called "Name" and then use code to display is where "Display" Name used to be?

No, you cannot. You can remove the Display name, then create new fields, but the new fields will not change the display name in forum posts. Forum posts populate the display name field, they not use any custom fields.

The "About" field can be removed and changed to another field. Just make sure the new field is inserted in both "Profile home" and Account pages.

Next time please use the Pre-Sale Tab or the gVectors Forum for addons related questions. Here we only support the main wpForo plugin.

Reply
Share: