链接到您自己的帖子(也称为互连)对于 SEO 非常有用。然而,在您的网站上启用 pingback 后,相互链接的帖子可能会变得烦人,因为 WordPress 会自动为该帖子创建新的 pingback。这些 pingback 出现在您帖子的评论部分。虽然有些用户可能喜欢此功能,但许多用户认为它没什么用。在本文中,我们将向您展示如何在 WordPress 中禁用 self pingbacks。
链接到您自己的帖子(也称为链接)对于 SEO 非常有用。然而,一旦您在网站上启用了 pingback,链接到链接帖子的链接就会变得烦人,因为 WordPress 会自动为该帖子创建新的 pingback。这些 pingback 出现在您帖子的评论部分。虽然有些用户可能喜欢此功能,但许多用户认为它没什么用。在本文中,我们将向您展示如何在 WordPress 中禁用 self-pingbacks。

什么是Pingback? (What is a Pingback?)
Pingbacks 使软件能够在网站之间进行通信。这几乎就像远程评论一样。可以这样想:
Pingbacking 使软件能够在网站之间进行通信。这几乎就像远程注释。可以这样想:
- We write a post on WPBeginner blog. 我们在WPBeginner博客上写了一篇文章。
- Then you write a post on your blog mentioning/linking to our article. 然后,您会在博客上写一篇提及/链接到我们文章的文章。
- Your blogging software (WordPress) will automatically send us a pingback. 您的博客软件(WordPress)将自动向我们发送pingback。
- Our blogging software (WordPresS) will receive the ping. It will then automatically go to your blog to confirm that the pingback originates there (check if the link is present). 我们的博客软件(WordPresS)将收到ping命令。 然后,它将自动转到您的博客,以确认pingback源自那里(检查链接是否存在)。
- Then we will have the ability to display your pingback as a comment on our post. This will solely be a link to your site. 然后,我们将能够显示您的pingback作为对我们帖子的评论。 这仅是指向您网站的链接。
Pingbacks 也可以在您的网站内使用。因此,如果您的一篇文章链接到另一篇文章,那么您的 WordPress 将发送一个自我 ping。这真的很烦人。
Pingbacks 也可以在您的网站上使用。因此,如果您的一篇文章链接到另一篇文章,您的 WordPress 将发送自我检查。这会变得非常烦人。

Fore more details, take a look at our guide about trackbacks 和 pingbacks.
有关更多详细信息,请参阅有关报价和 Pingback指南。
现在您知道什么是 pingback,让我们看看如何禁用 self pingback。
现在您知道了什么是 pingback,让我们看看如何禁用 self pingback。
影片教学 (Video Tutorial)
如果您不喜欢该视频或需要更多说明,请继续阅读。
如果您不喜欢该视频或需要更多说明,请继续阅读。
您可以通过多种方式禁用 WordPress 网站上的自我 pingback。我们将向您展示插件方法和手动代码方法。
您可以通过多种方式禁用 WordPress 网站上的自我 pingback。我们将向您展示插件方法和手动代码方法。
使用插件在WordPress中禁用自我Pingbacks (Disable Self Pingbacks in WordPress Using Plugins)
您可以使用两个插件来关闭自我 ping。
您可以使用两个插件来关闭自检。
1.使用No Self Pings插件
1.不使用self-pings插件
First thing you need to do is install and activate the 无自 Ping plugin. The plugin works out of the box, and there are no settings for you to configure. Simply activating the plugin will turn off self pingbacks.
您需要做的第一件事是安装并激活无自 Ping插件。 该插件可以直接使用,没有可供您配置的设置。 只需激活插件即可关闭自我pingbacks。
您会注意到 No Self Pings 插件已经两年多没有更新了。通常我们不建议安装这么长时间没有更新的插件。原因很简单,因为在大多数情况下这些插件不起作用。然而,No Self Pings 是一个非常简单的插件,甚至可以在最新版本的 WordPress(撰写本文时为 4.2.3)上使用。
您会注意到 No Self Pings 插件已经两年多没有更新了。一般来说,我们不建议安装长时间未更新的插件。原因很简单,因为在大多数情况下这些插件无法正常工作。然而,No Self Pings 是一个非常简单的插件,即使在最新版本的 WordPress(撰写本文时为 4.2.3)中也能工作。
We recommend you to read our guide on the issue of 安装未经您的 WordPress 版本测试的插件.
我们建议您阅读有关插件安装未使用 WordPress 版本进行测试问题的指南。
2. 使用禁用插件
2.使用Disabler插件
Simply install and activate the 禁用器 plugin. Upon activation, visit 设置 » 禁用器 page to configure the plugin.
只需安装并激活禁用器插件即可。 激活后,访问设置 » 禁用页面以配置插件。

You will notice that the plugin allows you to turn off several WordPress features. You need to scroll down to 后端设置 section and check the box next to 禁用自 ping option.
您会注意到,该插件允许您关闭一些WordPress功能。 您需要向下滚动到「后台设置」部分,然后选中“ 禁用自 ping”选项旁边的框。
单击保存更改按钮来存储您的设置。
单击“保存更改”按钮来存储您的设置。
在不使用插件的情况下关闭自ping (Turn Off Self Pings Without Using a Plugin)
如果您不想使用插件,那么您可以使用这两种方法来关闭站点上的自 Ping。
如果您不想使用插件,可以使用这两种方法关闭网站上的自 Ping。
1. 全局关闭 Pingbacks
1. 全局关闭 Pingbacks
WordPress 允许您关闭网站上的 pingback。通过使用此选项将完全禁用您网站上的 pingback 功能。
WordPress 允许您关闭网站上的 pingback。使用此选项将完全禁用网站上的 pingback 功能。
Simply go to 设置 » 讨论 page. Under the 默认文章设置 section, uncheck the box next to “尝试通知文章链接到的任何博客” option. Click on the save changes button to store your settings.
只需转到设置 » 讨论页面。 在“ 默认文章设置”部分下,取消选中“尝试通知与本文链接的任何博客”选项旁边的框。 单击保存更改按钮以存储您的设置。

2. 手动插入代码以禁用自 Pingbacks
2.手动插入代码禁用self-Pingbacks
如果您习惯向 WordPress 主题文件添加代码片段,那么您可以使用此方法来关闭自 ping。
如果您愿意在 WordPress 主题文件中添加代码片段,可以使用此方法关闭自检功能。
Simply copy and paste this code in your theme’s 函数.php file or a 特定于站点的插件.
只需将此代码复制并粘贴到主题的函数.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' );
That’s all, we hope this article helped you disable self pings on your WordPress site. You may also want to check our guide on how to 阻止 WordPress 引用垃圾邮件.
仅此而已,我们希望本文能帮助您在WordPress网站上禁用自查功能。 您可能还需要查看有关如何阻止 WordPress 引文垃圾邮件的指南 。
If you liked this article, then please subscribe to our YouTube 频道 for WordPress video tutorials. You can also find us on 推特 and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube 频道 WordPress视频教程。 您也可以在推特和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/wp-tutorials/how-disable-self-pingbacks-in-wordpress/