WordPress.org

Ready to get started?Download WordPress

Forums

How to add nofollow manually (8 posts)

  1. newtothis2
    Member
    Posted 3 years 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

  2. onepack
    Member
    Posted 3 years ago #

    Looking for the same thing here

  3. ashifttech
    Member
    Posted 3 years 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.

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

  5. ashifttech
    Member
    Posted 3 years ago #

    Yes that is a good point to make

  6. keyaspects
    Member
    Posted 3 years ago #

    core code being?

    single.php and so on?

  7. ashifttech
    Member
    Posted 3 years ago #

    Core code meaning anything inside a .php file. so Yes

  8. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags