Turn Off Self Pingbacks without Plugin in WordPress

What is a Pingback?

Pingbacks provide the ability to communicate between one site into another websites. Linking to your own posts also known as interlinking is great for SEO. However with pingbacks enabled on your site, interlinking posts can become annoying because WordPress automatically creates new pingback for that post. These pingback appear in the comments section of your posts. It’s almost like remote comments. let’s take an example.

For example, You write a post in your blog site. Then we write a post on our site linking/mentioning to your article. Our WordPress site will automatically send you a Pingback in your WordPress dashboard or in your administrator email. Pingbacks also work within your own site. So if one of your posts link to another post, then your WordPress site will send a self-ping. This can get very annoying.

Disable Self Pings Without Using a Plugin :

In this section, we will discuss two way to Turn Off your Self Pingbacks from your WordPress site. First one will completely disable pingback feature from your site and 2nd one will turn off self Pingbacks from your WordPress website.

01 : WordPress allows you to turn off pingbacks from your sites dashboard. By using this option will disable pingback feature globally from your site. Easily go to the Settings and the click on Discussion page. Under the Default post settings section, uncheck the box next to ‘Attempt to notify any blogs linked to from the post’ option. Click on the save changes button to save your setting.

02 : If you are comfortable with adding custom code to your WordPress Theme files, then you can use this method to switch off self pings. Simply copy and paste this code in your theme’s functions.php to disable self Pingbacks from your WordPress website.

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' );

Note: When adding, editing or modifying code from your functions.php file, Please be careful. If you make any mistake, your site may be broken.

Turn Off Self Pingbacks in your WordPress site Using Plugins :

There is a plugin available on the WordPress Plugin depository that you can use to disable self Pingbacks from your WordPress site. The name of the plugin is : No Self Pings by David Artiss.

Simply install this plugin from WordPress Plugin depository and enjoy its feature. By default, your self pingbacks will be stopped automatically after installing “No Self Pings” Plugin.

Table of Contents :

Facebook : Alamin Islam

Leave a Comment

Your email address will not be published.