WordPress disable self pingbacks is an easy way to stop WordPress from sending trackbacks to itself. Get rid of annoying self-ping notifications — no plugin needed!
Add this to your child theme’s functions.php
file:
function qdt_disable_self_pingbacks( &$links ) {
foreach ( $links as $key => $link ) {
if ( strpos( $link, get_option( ‘home’ ) ) === 0 ) {
unset( $links[$key] );
}
}
}
add_action( ‘pre_ping’, ‘qdt_disable_self_pingbacks’ );
How It Works
This WordPress disable self pingbacks snippet loops through all outgoing pingback links. If the link matches your own site’s URL, it removes it before the ping happens.
Why WordPress Disable Self Pingbacks?
Internal pingbacks clutter your comments and notifications. Disabling them keeps your moderation clean while still allowing external pingbacks.
Common Mistake
This won’t disable all pingbacks globally — only self-referencing ones. To disable all, adjust your discussion settings too.
Pro Tip
Combine this with other comment tweaks for a cleaner WordPress backend.