How to disable self Pingbacks in WordPress

By
Updated April 10, 2016
No Comments
5

How to disable self Pingbacks in WordPress


Tim Brown

Tim Brown is the owner of Hook Agency, and strategic marketer focused primarily on driving traffic and leads for small businesses and construction companies.

Getting too many pingbacks from yourself in WordPress? Turn them off very simply by just adding this to your functions.php file:

function no_self_ping( &$links ) {
	$home = get_option( 'home' );
	foreach ( $links as $l => $link )
		if ( 0 === strpos( $link, $home ) )
			unset($links[$l]);
}

add_action( 'pre_ping', 'no_self_ping' );

If you’re not feeling so bold to edit your functions.php file (it’s not so bad, I promise) check out this simple plugin to do it for you – No Self Pings. According to WordPress themselves – they allow them by default because they ‘are useful to some,’ though I’m not exactly sure how.

…and after you successfully disable self pingbacks in WordPress, take a leisurely gander at these other tasty functions.php code snippets for your copy and pasting delight:

1. Change the WordPress Login logo with your own
2. Add a duplicating function to your posts and pages
3. How to track WooCommerce Revenue in Optimizely – Functions.php snippet

or – check out the WordPress for Noobs series – Where I share how to get started with WordPress from scratch, tailored for people just starting out. 

  •  
  •  
  •  
  •  

Related Posts


Tim Brown

Tim Brown is the owner of Hook Agency, and strategic marketer focused primarily on driving traffic and leads for small businesses and construction companies.

Free Marketing Audiobook

Leave a Reply

Be the First to Comment!

Notify of
avatar

Ready to Get Started?

Get a free consultation now