Google Ad

How to disable Pingbacks Comment on WordPress Website ?


How to disable Pingbacks Comment on WordPress Website ?

Here is a way to stop pingbackson your wordpress website.

How to disable Pingbacks Comment on WordPress Website ?

 

Step – 1

Go to functions.php in your themes and add following codes most below.

 

 
 
  1. function no_self_ping( &$links ) {
  2. $home = get_option( 'home' );
  3. foreach ( $links as $l => $link )
  4. if ( 0 === strpos( $link, $home ) )
  5. unset($links[$l]);
  6. }
  7. add_action( 'pre_ping', 'no_self_ping' );

 

Done…

 

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *

"