Notifications
Clear all

wpForo 1.x.x how can i change multiple icon social from profil ?

2 Posts
2 Users
0 Likes
423 Views
tony
Posts: 1
 tony
Topic starter
(@tony)
New Member
Joined: 2 years ago

hey, i found this code in this forum 

I tried it and it actually works ! but the problem is : i just can change one icon

i would like to know if someone can make me a code juste to make multiple icon change possible !! THX GUYS!

https://wpforo.com/community/postid/12815/

For example you change AOL IM to Vkantacte.

$field = 'aim';

For example you change ICQ to Vkantacte.

$field = 'icq';

You should add a small code in wpForo Field hook. Navigate to Dashboard > Appearance > Editor and put this code in functions.php file of your active child theme's functions.php file. If it doesn't have child theme put it in current theme functions.php file.

I'd also recommend useWP Editorplugin instead of WordPress native editor. The native editor sometimes doesn't save changes. Just installWP Editorthen navigate to the same page and put this code as described above

function wpforo_change_social_field_icon( $fields ){ 
  //Field name 
  $field = 'aim'; 
  //Font-Awesome icon class  http://fontawesome.io/icons/  
  $icon = 'fa-vk'; 
  if( !empty($fields) && isset($fields[$field])) $fields[$field]['faIcon'] = $icon; return $fields;
}
add_filter( 'wpforo_member_after_init_fields', 'wpforo_change_social_field_icon' );

 

1 Reply
Robert
Posts: 9966
Admin
(@robert)
Support Team
Joined: 7 years ago

Hi @tony,

As a quick solution I'd recommend wpForo User Custom Fields addon, it let you manage all fields in account, profile, register and user search pages. Even more, you can create custom tabs in user profile page: https://gvectors.com/product/wpforo-user-custom-fields/

Here is the screenshot of the admin page which allows you to manage each field:

Reply