Forums

Join
bbPress Support ForumsTroubleshootingcan't seem to get bb_new_forum() function to create a new forum

Info

can't seem to get bb_new_forum() function to create a new forum

  1. Not sure what I'm doing wrong here

    I'm just using bb_new_forum($args) where I'm feeding it a string for a name and a description through an array

    it's not creating any new forums though - anyone have experience with this? I haven't been able to find much documentation on it.

  2. Did you ever solve this?

    When I try to call bb_new_forum() from functions.php using the action hook wpmu_new_blog I get "Fatal error: Call to undefined function bb_new_forum() ".

  3. Just realized that a forum is just another post-type.
    So you can create a forum the same way you create other posts:

    $post = array(
    'post_title' => 'My forum',
    'post_content' => 'This is a forum.',
    'post_name' => 'my-forum',
    'post_status' => 'publish',
    'post_type' => 'forum',
    );

    $post_id = wp_insert_post($post);

  4. You must log in to post.