To disable pingbacks in Wordpress simply add the following PHP code to functions.php of your current (child-) theme.
<?php
add_action('pre_ping', 'disable_pingback');
function disable_pingback(&$links) {
foreach ($links as $l => $link)
if (0 === strpos($link, get_option('home')))
unset($links[$l]);
}
Code Reference:
https://developer.wordpress.org/reference/functions/wp_generator/
💡
If possible, always use a child theme so that the changes are not overwritten during the next theme update.
Disable Pingbacks
How to disable pingback in Wordpress?