Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)

  • danoman
    Participant

    @danoman

    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() “.


    danoman
    Participant

    @danoman

    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);

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar