• In a multisite configuration, /api calls to any subdomain fail with 404 – not found. This is because register_activation_hook is only called once, not once per subdomain. Thus, rewrite rules are not added for the subdomains.

    A quick hack/work-around is to add the following to json-api.php , around line 33 in function json_api_init:

    add_filter('option_rewrite_rules', 'json_api_rewrites');

    https://wordpress.org/plugins/json-api/

The topic ‘not working for multisite’ is closed to new replies.