Title: do_all_pingbacks
Published: December 9, 2020
Last modified: February 24, 2026

---

# do_all_pingbacks()

## In this article

 * [Source](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#wp--skip-link--target)

Performs all pingbacks.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#source)󠁿

    ```php
    function do_all_pingbacks() {
    	$pings = get_posts(
    		array(
    			'post_type'        => get_post_types(),
    			'suppress_filters' => false,
    			'nopaging'         => true,
    			'meta_key'         => '_pingme',
    			'fields'           => 'ids',
    		)
    	);

    	foreach ( $pings as $ping ) {
    		delete_post_meta( $ping, '_pingme' );
    		pingback( null, $ping );
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/comment.php#L3019)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment.php#L3019-L3034)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#related)󠁿

| Uses | Description | 
| [get_posts()](https://developer.wordpress.org/reference/functions/get_posts/)`wp-includes/post.php` |

Retrieves an array of the latest posts, or posts matching the given criteria.

  | 
| [delete_post_meta()](https://developer.wordpress.org/reference/functions/delete_post_meta/)`wp-includes/post.php` |

Deletes a post meta field for the given post ID.

  | 
| [pingback()](https://developer.wordpress.org/reference/functions/pingback/)`wp-includes/comment.php` |

Pings back the links found in a post.

  | 
| [get_post_types()](https://developer.wordpress.org/reference/functions/get_post_types/)`wp-includes/post.php` |

Gets a list of all registered post type objects.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/do_all_pingbacks/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.6.0](https://developer.wordpress.org/reference/since/5.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fdo_all_pingbacks%2F)
before being able to contribute a note or feedback.