How To Disable Self Trackbacks

Wordpress

In WordPress when another blog links to a post it perform a trackback or a pingback this is to let the author know that another blog as linked to their content.

This is a very useful feature of WordPress and can help build a network around your blog.

The problem is if you link to your existing content within your post you too will also perform a pingback to your blog.

You can disable this feature by adding the following to your functions.php.

function disable_self_trackback( &$links ) {

    foreach ( $links as $l => $link )

        if ( 0 === strpos( $link, get_option( 'home' ) ) )

            unset($links[$l]);

}

add_action( 'pre_ping', 'disable_self_trackback' );

WordPress Plugin

If you don't feel comfortable playing around with the functions.php file, then I've created a WordPress plugin to do this exactly functionality.

All you have to do is go to the WordPress.org site download the plugin, move it into your plugins folder, go to the plugin dashboard and activate the plugin, now your site will disable self pingbacks.

Disable Self Pingbacks Plugin

Advertise here

Comment