Introduction to WordPress Pingback and TrackBack mechanisms and their optimization

Source: Internet
Author: User
Tags pings
Pingback and TrackBack are both a method used in the blog system to notify other blog posts to be referenced. They allow the blog author to track who is linked to his article. WordPress and other advanced blog platforms have the function of automatically adding links to all links in pingback articles (TrackBack needs to be manually added, that is, Pingback is automatically sent by the blog system like links in the text, while Tr

Both Pingback and TrackBack are used to notify other blog posts in the blog system.ReferencedA means of situation. They allow the blog author to track who is linked to his article. Advanced blog platforms such as WordPress have the function of automatically adding all links in pingback articles (TrackBack needs to be manually added, that isPingback is automatically sent by the blog system as a link in the text, while TrackBack is a link manually added by the blogger to send TrackBack.The two are essentially the same and are based onXML-PRC, both send ping,The difference between the two ping operations is unclear ).

  • In the background?SettingsYou can set"Attempt to notify all blogs linked to in the article", WordPress will automatically ping all links in the article when the article is published. The second option sets whether to accept Pingback and TrackBack from outside.

  • In addition to the link mentioned in the article"Additional" linksSend Ping, and enter the address in the TrackBack box on the article writing page:

  • WordPress receives Pingback/TrackBack as a comment and automatically intercepts summaries and displays many comments together.. (WordPress uses three types of "things" as comments by default: comment (comments sent by visitors in the message box), pingback, and trackback ). You can modify the code so that only comment is displayed in the comment area and pingback and trackback are separately displayed in other areas.

The Pingback and TrackBack mechanisms complement each other. you can send ping notifications to the referenced sites: "My article references/references your article ", this increases interaction between sites.

After talking about so many Pingback and TrackBack principles, I have to mention a well-known hack mechanism optimization technique ):

WordPress will automatically ping all links in the article, including the internal link. for example, if you mention article A in blog article B with A link, when article B is published, it will send A ping to article A without thinking. the comment area of article A appears immediately.Pingback type commentsSuch a comment has no practical significance.

So how?Prevent WordPress from pinging the internal links contained in the article.What about it? You can use a plug-in called No Self Pings. if you do not like the plug-in, you can use the following code:

// In functions. add the following code to php: function no_self_ping (& $ links) {$ home = get_option ('Home'); foreach ($ links as $ l => $ link) if (0 === strpos ($ link, $ home) unset ($ links [$ l]);} add_action ('pre _ ping ', 'No _ self_ping ');

This code is actually the core code of the No Self Pings plug-in.

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.