newtothis2
Member
Posted 1 year ago #
I'm trying to add a nofollow tag to my blogroll links. In the link section under "relationship", I can not enter nofollow. I know there are plugins out there to do this but I would like to do it manually. Any suggestions on how to do it? Thanks in advance
Looking for the same thing here
ashifttech
Member
Posted 1 year ago #
One solution would be to add a nofollow checkbox. This is actually very easy, given the javascript code. Just add this to edit-link-form.php, around line 113:
<tr>
<th scope="row"> <?php _e('following') ?> </th>
<td>
<label for="follow">
<input class="valinp" type="checkbox" name="follow" value="nofollow" id="nofollow" <?php xfn_check('follow', 'nofollow'); ?> />
<?php _e('nofollow') ?></label>
</td>
</tr>
[Please post code snippets between backticks or use the code button.]
Voila. Checkbox produces nofollow code.
Do not edit core code unless you really, really, know what you are doing. Worst case scenarios: you can bring your entire site down or inadvertently open a hole that hackers can then exploit.
ashifttech
Member
Posted 1 year ago #
Yes that is a good point to make
keyaspects
Member
Posted 1 year ago #
core code being?
single.php and so on?
ashifttech
Member
Posted 1 year ago #
Core code meaning anything inside a .php file. so Yes
Not quite...
General rule of thumb: If it's inside the wp-content folder, it's not a core file. Anything in the root WordPress folder, wp-admin or wp-includes is a core file.