Notifications
Clear all

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

3 Posts
2 Users
1 Reactions
2,779 Views
Posts: 5
Topic starter
(@edy-pras)
Active Member
Joined: 2 years 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?

2 Replies
Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 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)
Joined: 2 years ago

Active Member
Posts: 5

@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