Back to top

Affiliate Link: Looking to Monetize With Ads?? We Personally Use:

Ezoic

Stop Self Pingbacks From Showing In Comments

Featured Tiles
As an Amazon Associate we earn from qualifying purchases made on our website. If you make a purchase through links from this website, we may get a small share of the sale from Amazon and other similar affiliate programs. You can read our complete legal information for more details.

For anyone who gets irritated with pingbacks to their posts when they link them the code below you can add to a [ Code Snippets ] Plugin to stop these from running on your blog.

Install the Code Snippets Plugin

  1. New Code Snippet
  2. Title: Stop Self Pingbacks
  3. Code: Paste the below code block
  4. Set To Run Snippet Everywhere
  5. Save Changes and Activate
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 find a post helpful and feel like rewarding my effort with the price of a beer, please donate here

About Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals!
Read More About Me...

My Posts | Website

Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals!
Read More About Me...

Leave a Reply

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

Recent Content