WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
Help with custom controller get_category_post function with additional parameter (1 post)

  1. Rohan
    Member
    Posted 2 years ago #

    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. Please use the pastebin]

    Thanks!

    http://wordpress.org/extend/plugins/json-api/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags