Notifications
Clear all

Script [Solved] How to change Dofollow link for website link in participant profile?

3 Posts
2 Users
1 Likes
2,336 Views
edy pras
Posts: 2
Topic starter
(@edy-pras)
New Member
Joined: 3 weeks ago

Hi, I want to change link only in participant profil website to DoFollow rell. But not for links on forum topics. Can anyone help me?

wpForo Version
2.1.1
WordPress Version
6.1.1
2 Replies
Robert
Posts: 9912
Admin
(@robert)
Support Team
Joined: 7 years ago

Hi @edy-pras,

You can use this code to remove the nofollow rel from the profile website links. Put this code in a PHP snippet of the Code Snippets plugin or insert it directly in the functions.php file of the current active WordPress theme.

add_filter('wpforo_form_prepare_values', function( $field ){
if( 'url' === wpfval($field, 'type') ){
$field['value'] = str_replace('rel="nofollow"', '', $field['value']);
}
return $field;
}, 10);
1 Reply
edy pras
(@edy-pras)
Joined: 3 weeks ago

New Member
Posts: 2

@robert Thank you for the code you provided, I have installed it and it works on my forum. Once again, thank you very much for the help you provide