scottopolis/wpIonic

POST TYPE

Closed this issue · 1 comments

Hey there Scott! I have been using the WpIonic App and I am able to call my regular posts but when my custom 'wp-json/posts?type=ait-dir-item' posts wont show. I can see the JSON code with all the items is there a configuration I need to make to one of the JS or Reactor plugin?

Hi, for a CPT you can add it to controllers.js line 8 like this: $rootScope.callback = 'type=ait-dir-item&_jsonp=JSON_CALLBACK';

You may also need to create a new single post view and controller, since the current one only displays the_content. If you have custom meta data, you need to add that to the API as well like this: https://apppresser.com/custom-plugins-reactor/