Adding “nofollow” option to WordPress add link page

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:

1. Open /wp-admin/includes/meta-boxes.php.

2. Find the function link_xfn_meta_box and find following lines:

<tr>
	<th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?>

3.Right before the <tr> tag insert the following code:

<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.
4. Save and upload the file to the same folder.
5. 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 work ;)

Related Posts

NS Weight Release

WP-Backgrounds Lite by InoPlugs Web Design and Juwelier Schönmann 1010 Wien