How to remove pings

 In Functions

How to remove pings:

//remove pings
function ns_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’, ‘ns_no_self_ping’ );

 

source: 10 Tips optimize WordPress theme

Recent Posts

Leave a Comment

Start typing and press Enter to search

Let's work together

I'd love to work with you! Please fill out my project form to tell me more about your project/work. I reply to all enquiries within 48 hours.

Availability

  • May - Booked
  • June - Booked
  • July - Limited

Rates

  • My day rate is £300.
  • I can provide a fixed price for your work.
  • Projects start at around £2,000.

Header Enquiry Form

  • This form collects your name, email address and telephone number so that I can respond to the enquiry(ies) that you submit via this website. Please check my privacy policy for the full story on how I use, protect and manage your submitted data.