Support » Plugin: Jetpack by » JSON API Custom Post Types

Viewing 2 replies - 1 through 2 (of 2 total)
  • Okay, i actually don’t really have a clue what I did here, but this fixed it for me:

    function allow_my_post_types($allowed_post_types) {
    $allowed_post_types[] = 'portfolio';
    return $allowed_post_types;
    add_filter( 'rest_api_allowed_post_types', 'allow_my_post_types');

    Thanks for providing your example in the first place 🙂

    A huge thanks to you. The problem seems to have been with the array($this,”). I tried adding back in the other parts of the function with just the changes you made to add_filter and it still worked. The function I wrote was based on the bbpress example they included in the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JSON API Custom Post Types’ is closed to new replies.