How to Add Nofollow to WordPress Friend Links
Nofollow is an attribute value of an HTML tag. Its meaning is to tell search engines "do not track links on this page or do not track this specific link." Therefore, using the nofollow tag correctly can prevent the loss of website weight. Why does this article introduce adding nofollow to friend links? Doesn't this seem unfair? Actually, no. Sometimes, when a website changes its domain or the other party's website is penalized ("K"ed), you can temporarily add nofollow after notifying the other party. This is beneficial for you, them, and the search engines, but please remember to remove it in time.
If your WordPress site uses <a> tags directly to add friend links, adding nofollow is straightforward. You simply need to add rel="nofollow" to the <a> tag. However, if you use the built-in WordPress friend link feature, a small modification is required.
In newer versions of WordPress, the friend link option has been disabled by default. You can restore this option by restoring the friend link feature option. However, when setting up friend links, you may find that there is no option to add nofollow. What should you do?
The solution is simple. Locate the /wp-admin/includes/meta-boxes.php PHP file and add the following code after approximately line 964. Save the file and overwrite the original. You will then see a new nofollow option button. Finally, update the link.
<label for="nofollow">
<input class="valinp" type="radio" name="friendship" value="nofollow" id="nofollow" <?php xfn_check('friendship', 'nofollow'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('nofollow') ?>
</label>


Finally, how do you verify if the nofollow has been added successfully? If you are familiar with HTML tags, you can directly check the page source code. If you see the rel="nofollow" tag added to your specified link, it means the addition was successful. If you don't understand HTML, it's also simple. You can use a browser extension to help identify nofollow links.
If you find this article helpful, please share it. If you have any questions, you can add my QQ or leave a message below. I wrote this by hand, so I'll take a break now.