Title: Removing a post
Last modified: August 20, 2016

---

# Removing a post

 *  [agent207](https://wordpress.org/support/users/agent207/)
 * (@agent207)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/removing-a-post/)
 * Is there a way to remove a post using JSON API?
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Dave van Hoorn](https://wordpress.org/support/users/freshcode/)
 * (@freshcode)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/removing-a-post/#post-3476511)
 * Hi,
 * I created a controller for deleting a post by ID. Save the PHP code from the 
   following link as ‘postsextra.php’ in the plugins -> json-api -> controllers 
   folder.
 * **Link**
    [http://pastebin.com/0mT3zSzp](http://pastebin.com/0mT3zSzp)
 * **Usage**
    1. Request a nonce using the following URL: [http://www.yourdomain.com/app/get_nonce/?controller=postsextra&method=delete_post](http://www.yourdomain.com/app/get_nonce/?controller=postsextra&method=delete_post)
 * 2. Then use the nonce to delete the post by ID, in this case post with ID 153
   
   [http://www.yourdomain.com/app/postsextra/delete_post/?nonce=c4dec48dbc&id=153](http://www.yourdomain.com/app/postsextra/delete_post/?nonce=c4dec48dbc&id=153)
 * Have a good one 🙂
 *  Thread Starter [agent207](https://wordpress.org/support/users/agent207/)
 * (@agent207)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/removing-a-post/#post-3476512)
 * Thank you, Freshcode.
 *  Thread Starter [agent207](https://wordpress.org/support/users/agent207/)
 * (@agent207)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/removing-a-post/#post-3476539)
 * One question Freshcode. When I execute the command I get the following error.
 * “error”: “Unknown controller ‘postsextra’.”
 * Does this need to initialize?
 *  [Dave van Hoorn](https://wordpress.org/support/users/freshcode/)
 * (@freshcode)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/removing-a-post/#post-3476548)
 * You need to activate the controller in the plugin settings. WP Dashboard -> Settings-
   > JSON API -> activate the Posts Extra controller
 *  Thread Starter [agent207](https://wordpress.org/support/users/agent207/)
 * (@agent207)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/removing-a-post/#post-3476558)
 * OOPS! Thank you again, Freshcode. It now works fine.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Removing a post’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

## Tags

 * [remove](https://wordpress.org/support/topic-tag/remove/)

 * 5 replies
 * 2 participants
 * Last reply from: [agent207](https://wordpress.org/support/users/agent207/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/removing-a-post/#post-3476558)
 * Status: not resolved