How to Disable Pingbacks and Trackbacks in WordPress

In this tutorial, we are going to discuss how to disable pingbacks and trackbacks on your WordPress website.


Pingbacks and Trackbacks

Trackbacks and Pingbacks are link notifications that enable you to keep track of when other sites link to your website contents. If the notifications are enabled, you will get alerts in the comments section of your posts. If you want to protect your contents from other users, you can disable Pingbacks and trackback feature.


Disable Pingbacks and Trackbacks from WordPress Dashboard

1) Login to WordPress Dashboard.

2) Navigate to “Settings”.

Disable Pingbacks


3) Click on “Discussion”.

Disable Pingbacks


4) Uncheck the second option “Allow link notifications from other blogs (pingbacks and trackbacks)”.

Disable pingbacks and trackbacks


5) Click the “Save Changes” button at the bottom of the page.


Inserting Code to Disable Self Pingbacks

Paste the below code in your theme’s functions.php file to disable self-pingbacks.


function no_self_ping( &$links ) {

$home = get_option( ‘home’ );

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

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



add_action( ‘pre_ping’, ‘no_self_ping’ );


If you need any further help please do reach our support department.