Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Closed] Add Board programmatcly

2 Posts
2 Users
0 Reactions
2,223 Views
Posts: 1
Topic starter
(@tobstar)
New Member
Joined: 7 years ago

Hi,

i just started using your Fourm plugin. Id like to add some boards automaticly, so i can add a board with mysql by inserting or just copy an entry to wpforo_forums. But when i do so, its not visible in Forum, only after going to Admin Panel, Edit the new created and just click save.

So, im asking how to add a board without using the admin panel.

1 Reply
Sofy
Posts: 5483
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 years ago

Hi @tobstar,

When you click on Edit/Save buttons, wpForo automatically deletes caches. So you just need to delete caches after adding forum with MySQL. Just navigate to Dashboard > Forum > Dashboard admin page, click on [Delete All Caches] button.

https://wpforo.com/docs/root/categories-and-forums/forum-manager/add-new-forum/

If you're a developer and need to do some customization then I'll provide you code that adds a forum. You just need to change red marked codes before using:

$forum = array(
'cat_layout' => 2,
'title' => 'forum title',
'slug' => 'forum slag',
'description' => 'forum description',
'parentid' => 0
);
WPF()->forum->add($forum);

In this case, also please don't forget to delete caches. 

Please also check out wpForo doc:

https://wpforo.com/docs/root/categories-and-forums/forum-manager/add-new-forum/