AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Add Board programmatcly

2 Posts
2 Users
0 Reactions
2,611 Views
Posts: 1
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tobstar)
New Member
Joined: 7 years ago
[#7632]

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: 5777
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@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/


Share: