Modify WordPress tips: To WP's friendship link add nofollow properties

Source: Internet
Author: User
Tags add modify php code root directory wordpress blog

Article Introduction: WordPress links to add Nofollow method of detailed explanation.

The early days of building a blog, the exchange of links is a good way to get high-quality links. However, sometimes although the other side of the site to give you a link, but to your friendship link added nofollow attribute, I believe that understanding nofollow tag children's shoes know nofollow is an HTML tag attribute value. The meaning of this label is to tell the search engine "do not track links on this page" or "do not track this particular link."

So personally do not agree to WordPress blog Links is that we say Friendship links add nofollow attributes, after all, exchange links pay attention to the integrity of the problem. Of course, nothing can be said so absolutely, sometimes if you find your Friendship link site appears down the right, the site is K phenomenon, if you can not contact the other webmaster instructions to delete the friend chain, this time you can not delete his link to his link to add a nofollow attribute, This will not allow your site to be implicated, but also show your integrity.

We can use to modify the WordPress program XFN link Relationship to solve, the following describes how to give WP links to add nofollow properties of the specific operation:

First, find the site root directory: "meta-boxes.php" file, the specific path is: "/wp-admin/includes/meta-boxes.php."

You can then add different PHP code depending on where you want it to appear.

Above is my personal blog add after the effect of the map, you will find that I just put the original "no" option to "nofollow", so that the operation is simple and can simplify the code, personally feel good.

So the simple operation is to find the following code in the "meta-boxes.php" file first

<label for= "Friendship" >
<input name= "Friendship" type= "Radio" value= "id=" Friendship "<?php Xfn_check" ("Friendship")?>/> PHP/* translators:xfn:http://gmpg.org/xfn/* * _e ("none")?></label>

Replace the following code:

<label for= "Nofollow" >
<input name= "Friendship" type= "Radio" value= "nofollow" id= "nofollow" <?php Xfn_check
("Friendship", "nofollow");?>/> <?php/* translators:xfn:http://gmpg.org/xfn//_e ("nofollow")? ></ Label>
</fieldset></td>

The above is how to WP program site links to add nofollow properties of the specific methods of operation, if you have a better way, welcome message exchange advice.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.