Title: [Plugin: JSON API] Replace &quot;post&quot; in queries with different word
Last modified: August 20, 2016

---

# [Plugin: JSON API] Replace "post" in queries with different word

 *  [seaneherron](https://wordpress.org/support/users/seaneherron/)
 * (@seaneherron)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-json-api-replace-post-in-queries-with-different-word/)
 * Hi all,
 * I’m trying to basically replace the word post in all of the queries in the core
   controller with another word. For example, instead of:
 * `http://www.example.org/?json=get_recent_posts`
 * I’d like to have
 * `http://www.example.org/?json=get_recent_items`
 * or
 * `http://www.example.org/?json=get_item`
 * etc.
 * I tried duplicating the core controller and simply changing the function names,
   but that doesn’t seem to give me any luck. It looks like they all reference each
   other, which is causing the issue. When I try and go through and replace things
   like $post with $item, it also fails out. I can’t seem to find a clear delineation
   between what the plugin is referring to as a post and when it is going to wp_query().
   Can anyone assist with this?
 * Also – is there a simple way to just remove a specific item from the JSON response?
   For instance, if I wanted to remove the author information from the response,
   would editing models/post.php to remove the following do the trick, or is there
   something else I should be aware of?
 *     ```
       function set_author_value($author_id) {
           global $json_api;
           if ($json_api->include_value('author')) {
             $this->author = new JSON_API_Author($author_id);
           } else {
             unset($this->author);
           }
         }
       ```
   
 * Many, many thanks!
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

The topic ‘[Plugin: JSON API] Replace "post" in queries with different word’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [seaneherron](https://wordpress.org/support/users/seaneherron/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-json-api-replace-post-in-queries-with-different-word/)
 * Status: not resolved