huetherb (@huetherb)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • huetherb
    Participant

    @huetherb

    Here is what I needed to do:

    add_filter( ‘bbp_register_topic_post_type’, ‘enable_restAPI_bbpress_topics’, 10,1);
    function enable_restAPI_bbpress_topics ($args) {
    $args[‘show_in_rest’] = true;
    $args[‘supports’] = array( ‘title’, ‘editor’, ‘author’ );
    return $args;
    }
    Notice the supports variable. By including author that ensures post_author is set.

    Seriously, BBPress should simply include a setting in backend to enable restAPI. That is the direction that the web is heading in already, with headless CMS, decoupling front and and backend.

Viewing 1 replies (of 1 total)