Title: xmlrpc_removepostdata
Published: April 25, 2014
Last modified: February 24, 2026

---

# xmlrpc_removepostdata( string $content ): string

## In this article

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

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

XML-RPC XML content without title and category elements.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/xmlrpc_removepostdata/?output_format=md#parameters)󠁿

 `$content`stringrequired

XML-RPC XML Request content.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/xmlrpc_removepostdata/?output_format=md#return)󠁿

 string XML-RPC XML Request content without title and category elements.

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

    ```php
    function xmlrpc_removepostdata( $content ) {
    	$content = preg_replace( '/<title>(.+?)<\/title>/si', '', $content );
    	$content = preg_replace( '/<category>(.+?)<\/category>/si', '', $content );
    	$content = trim( $content );
    	return $content;
    }
    ```

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

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

| Used by | Description | 
| [wp_xmlrpc_server::blogger_newPost()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/blogger_newpost/)`wp-includes/class-wp-xmlrpc-server.php` |

Creates a new post.

  | 
| [wp_xmlrpc_server::blogger_editPost()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/blogger_editpost/)`wp-includes/class-wp-xmlrpc-server.php` |

Edits a post.

  |

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

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

## User Contributed Notes

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