Forum Replies Created

Viewing 1 replies (of 1 total)
  • I also have the same problem before. The code below works for me.

    This is the code in the theme’s functions.php

    // the external controller file
    require 'json-api.php';
    
    function add_hello_controller($controllers) {
      $controllers[] = 'iprofile';
      return $controllers;
    }
    add_filter('json_api_controllers', 'add_hello_controller');
    
    function set_hello_controller_path() {
      return "../wp-content/themes/iProfile3/json-api.php";
    }
    add_filter('json_api_iprofile_controller_path', 'set_hello_controller_path');

    For some reasons, I cannot use numbers in the controller names.

Viewing 1 replies (of 1 total)