How to Disable Self Pingbacks in WordPress

Pingback is a way in which you can notify other WordPress users that you have linked to their post. But, the issue with this feature is, if you are linking to your own content, it will send pingbacks to your own blog.

Must Read : How to Remove Width and Height Attributes From Inserted Images in WordPress

You can easily resolve this issue by adding a small amount of code to your functions.php file located inside your theme directory.

function disable_self_trackback( &$links ) {

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

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



add_action( 'pre_ping', 'disable_self_trackback' );

source :


Leave a Comment.