Skip to:

Delete via XML-RPC

  • I’ve been trying to delete a post via the XML-RPC API and just haven’t had any luck. I’m communicating fine with the API, sending and receiving works as expected, and the user has correct permissions. Everything else (as far as getting posts and making new posts) is also worked as expected. However, I’m always getting a return value of ‘0’ from the API, even though the post isn’t already deleted. I’m trying to accomplish this from Buddypress using bbPress Live. Any ideas on how to do this?

    My request and response:

    <?xml version="1.0"?>

    <?xml version="1.0"?>

    Here’s the code I added to the bbPress_Live class

    function delete_post( $post_id )
    global $current_user;
    if ( !$delete = $this->fetch->query( 'bb.deletePost', array( $post_id ), $current_user->user_login ) ) {
    return false;

    $key = md5( 'post_' . $post_id );
    $this->cache_delete( $key );

    return true;

  • You must be logged in to reply to this topic.
Skip to toolbar