Disable self trackbacks

WordPress trackback system makes sure that other blogs are noticed when you link to them. This is a great way to get more users, since a link to your post will be displayed on the target website.

Problem is, when you link to one of your own posts, on your own website, a trackback will be displayed although the link is coming from you.

To disable this, put the snippet in functions.php.

Code Snippet:

function disable_self_ping( &$links ) {
    foreach ( $links as $l => $link )
        if ( 0 === strpos( $link, get_option( 'home' ) ) )
add_action( 'pre_ping', 'disable_self_ping' );

Posted in Comments