Info
- 3 posts
- 2 voices
- Started 7 months ago by newmy
- Latest reply from danoman
- This topic is not resolved
can't seem to get bb_new_forum() function to create a new forum
-
- Posted 7 months ago #
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.
-
- Posted 4 months ago #
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() ".
-
- Posted 4 months ago #
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);
-
You must log in to post.