How to stop self ping from your own post

 

 

A blog pings all the pinging service that you have updated. Whenever you link your post to one of your own old posts, it will automatically send a pingback or self-ping. Some people find this feature useful. Others find it very annoying.  Let’s see how to stop self ping of your own post.

How to stop self ping from your own post

How to stop self ping from your own post

How to stop self ping from your own post

 

Before we see the methods stop self-ping, let us see how self-ping was created. When your site self-pings with the internal link on your post, it creates a comment with the link to your own post. Below image shows the pingback comment on your dashboard

 

 

self-pings-on-comments - Stop self ping

Self ping on comments

 

self-ping-on-site - How to stop self ping

Self ping on site

 

 

 

The above image shows the ping back or self ping created on the blog.

Methods to stop self ping

It is not possible to disable or stop self ping from the dashboard of your WordPress. There are two methods to stop the self-pinging of your post. The first method is with the help of codes and the second method is with the help of the plugin.

How to stop self ping in functions.php file

This is one of the easiest methods to stop self ping if you are well versed with the coding. You just need to add the code to your website theme.

Follow the steps below:

1. Login to your site.
2. From the dashboard, click on appearance and select editor.
3. Click on functions.php on the right hand side.
4. Add the code below to your theme’s functions.php file and click on apply at the bottom.

//remove pings to self
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’ );

adding-code-on-website-to-stop-self ping

 

If you are not willing to play with the code or afraid to edit your theme’s code, you can just follow the second method.

Disable self-ping with No self Ping plugin

You can just download the No Self Ping plugin and install it to stop self-pinging off your post. This plugin does the same job as the code mentioned above.

Advantages

No need to touch your themes coding.

Disadvantages

Additional plugin to your site.

Conclusion

You can use either the first method or install the plugin to stop the self-ping back of your blog. Some people wish to use an only limited number of plugins. For those, the first method is the best solution.

Get more stuff like this

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

4 Comments

  1. Md. Hamim Mondal February 27, 2015
  2. Umapathy February 28, 2015
  3. Ahmad Rasheed November 13, 2015
  4. Akshat November 21, 2015

Leave a Reply