AI Assistant
Notifications
Clear all

[Closed] how can i change multiple icon social from profil ?

2 Posts
2 Users
0 Reactions
1,514 Views
Posts: 1
 tony
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tony)
New Member
Joined: 5 years ago
[#16878]

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: 10721
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 2 months 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:


Share: