Today, I found that the link in the "My recommendations" column does not contain the nofollow attribute. This column mainly stores valuable blogs, it is a one-way friend chain initiated by tiandi. Therefore, the nofollow attribute can be added to prevent crawlers from crawling out.
We can see that there is no way to directly enter the content in the default link relationship. We can only select the link through the options below, but none of the options have the nofollow attribute. So we need to modify it a little bit, so that the nofollow project can be selected here.
The modification method is also simple, xfn is defined in/wp-admin/meta-box.php. Open the file and find the code similar to the following in line 3:
The code is as follows: |
Copy code |
<Tr> <Th scope = "row"> <? Php/* translators: xfn: http://gmpg.org/xfn/ */_ e ('Identity ')?> </Th> <Td> <fieldset> <legend class = "screen-reader-text"> <span> <? Php/* translators: xfn: http://gmpg.org/xfn/ */_ e ('Identity ')?> </Span> </legend> <Label for = "me"> <Input type = "checkbox" name = "identity" value = "me" id = "me" <? Php xfn_check ('Identity ', 'me');?> /> <? Php _ e ('Another web address of mine ')?> </Label> </Fieldset> </td> </Tr> |
Add the following code below.
The code is as follows: |
Copy code |
<Tr> <Th scope = "row"> Nofollow </th> <Td> <fieldset> <legend class = "screen-reader-text"> <span> nofollow </span> </legend> <Label for = "nofollow"> <Input class = "valindium" type = "checkbox" name = "nofollow" value = "nofollow" id = "nofollow" <? Php xfn_check ('nofollow', 'nofollow');?> /> Nofollow </label> </Fieldset> </td> </Tr> |
Okay. Let's see if the result is as shown in the following figure.