Title: [Plugin: JSON API] Help with custom controller get_category_post function with additional parameter
Last modified: August 20, 2016

---

# [Plugin: JSON API] Help with custom controller get_category_post function with additional parameter

 *  [Rohan](https://wordpress.org/support/users/rohanrehmangmailcom/)
 * (@rohanrehmangmailcom)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-json-api-help-with-custom-controller-get_category_post-function-with-additional-parameter/)
 * New to WP and $php, trying to correctly alter a working php method to receive
   an additional parameter.
 * I’ve duplicated the get_category_post method into my custom controller and I 
   am unsure how to modify the get_category_posts method to also receive “tag_id”
   or “tag_slug” as a parameter and accept a call string like
 * ?json=custom.get_category_posts&**category_slug**=_somecategory_&**tag_slug**
   =_sometagslug_
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * Thanks!
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

The topic ‘[Plugin: JSON API] Help with custom controller get_category_post function
with additional parameter’ 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: [Rohan](https://wordpress.org/support/users/rohanrehmangmailcom/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-json-api-help-with-custom-controller-get_category_post-function-with-additional-parameter/)
 * Status: not resolved