Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

No pingbacks to your own posts

When you link to one of your own posts, WordPress sends it a pingback, which shows up as a comment. This stops that.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Tested with WordPress 7.1
PHP
<?php

add_action(
	'pre_ping',
	static function ( &$links ) {
		$home = home_url();
		foreach ( $links as $i => $link ) {
			if ( str_starts_with( (string) $link, $home ) ) {
				unset( $links[ $i ] );
			}
		}
	}
);

In these packs

  • Performance: Small changes that save the server and the browser some work.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.