With default wordpress add link page you are not allowed to type into the rel input box. Since nofollow is popular now one of my clients requested this option to be added to the add link feature. ** Add link form is generated by *edit-link-form.php under wordpress admin folder. XFN metabox is generated from meta-boxes.php file though. So this is the file we are going to edit.
Here is how to add nofollow option to wordpress add link page: ***
Find the function link_xfn_meta_box and find following lines: [php title=”meta-boxes.php”]<tr> <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e(‘identity’) ?> ```
3.Right before the
<tr> tag insert the following code: [php title=”meta-boxes.php”]<tr> <th scope="row"> nofollow </th> <td> <label for="nofo"> <input class="valinp" type="checkbox" name="nofo" value="nofollow" id="nofo" <?php xfn_check(‘nofo’, ‘nofollow’); ?> /> nofollow</label> </td> </tr> ```
This will add “nofollow” option to add link options.
- Save and upload the file to the same folder.
- And you are done. Now you can add nofollow rel tag to your links from wordpress add link page.
Hope this helps you, on your seo work ;)