Disable Self Trackbacks in WordPress

WordPress has a great inbuilt function known as trackbacks which is make a notification when blogs links together. This is a best way to get more users. But in some case we need to disable self trackbacks, and here is a code for doing this job easily. Just copy and past it into your functions.php and your WordPress will disable self trackbacks.

<?php
/**
 
 * Disable Self Trackbacks in WordPress
 
 *
 
 */
 
function disable_self_ping( &$links ) {
    foreach ( $links as $l => $link )
        if ( 0 === strpos( $link, get_option( 'home' ) ) )
            unset($links[$l]);
}
add_action( 'pre_ping', 'disable_self_ping' );
?>

Related posts:

Partner with Us

We are providing an exclusive partnership offer to individuals and companies who are interested in setting up their own web design & development company. For more information about how to partner with us, please contact us