Bulletin boards and forums are good old reliable tools to build online communities.
公告板和论坛是建立在线社区的良好可靠工具。
While there are plenty of open-source forum software, integrating a third-party forum with WordPress can be a mess. That’s where bbPress comes in.
尽管有很多开放源代码论坛软件,但将第三方论坛与WordPress集成可能会一团糟。 那就是bbPress进来的地方。
In this article, we will show you how to easily add a forum in WordPress with bbPress.
在本文中,我们将向您展示如何使用bbPress在WordPress中轻松添加论坛。
什么是bbPress? (What is bbPress?)
bbPress is a forum software built the WordPress way. It runs on top of WordPress, which is the best website builder in the world.
bbPress是使用WordPress方式构建的论坛软件。 它运行在WordPress之上,而WordPress是世界上最好的网站构建器 。
Just like WordPress, bbPress is extensible, and you can install add-on plugins to add more functionality to your forums. It is also very light-weight and faster than other popular open-source forum software.
就像WordPress一样,bbPress是可扩展的,您可以安装附加插件来为论坛添加更多功能。 与其他流行的开源论坛软件相比,它也非常轻巧且速度更快。
使用bbPress建立在线论坛需要什么? (What You Need to Make an Online Forum with bbPress?)
If you already have a WordPress website where you want to add a forum, then you can skip this section. On the other hand, if you are just getting started then continue reading.
如果您已经有一个要在其中添加论坛的WordPress网站,则可以跳过此部分。 另一方面,如果您只是入门,请继续阅读。
First, you’ll need to sign up for a web hosting account. This is where you will store all the files for your online forum.
首先,您需要注册一个虚拟主机帐户。 您将在这里存储在线论坛的所有文件。
You’ll also need a domain name. This will be your website’s address on the internet and what users will type in their browsers to find your online forum.
您还需要一个域名 。 这将是您网站在Internet上的地址,以及用户将在其浏览器中键入的内容,以找到您的在线论坛。
Normally, website hosting costs $7.99 per month and domain name would cost you around $14.99 per year.
通常,网站托管费用为每月7.99美元,域名每年的费用约为14.99美元。
This is a lot of money if you are just getting started.
如果您刚刚开始,这是很多钱。
Luckily, Bluehost has agreed to offer WPBeginner users a discount on hosting with a free domain name. Basically, you’ll be able to get started for just $2.75 per month.
幸运的是, Bluehost已同意为WPBeginner用户提供免费域名托管的折扣。 基本上,您每月只需支付2.75美元就可以开始使用。
→ Click Here to Claim This Exclusive Bluehost Offer ←
Bluehost is one of the biggest WordPress hosting companies in the world and an officially recommended WordPress hosting provider.
Bluehost是全球最大的WordPress托管公司之一,也是官方推荐的WordPress托管提供商。
Once you have signed up for hosting, you can follow our guide on how to make a website for complete installation instructions.
注册托管后,您可以按照我们的指南制作网站,以获取完整的安装说明。
After setting up WordPress, you will be ready to install bbPress and start your own online community.
设置WordPress之后,您将准备安装bbPress并启动您自己的在线社区。
如何安装bbPress (How to Install bbPress)
bbPress is available as a WordPress plugin. You can install it like you would install any WordPress plugin.
bbPress可作为WordPress插件使用。 您可以像安装任何WordPress插件一样安装它。
Simply log in to your WordPress admin area and go to Plugins » Add New . Search for bbPress and then select bbPress from results.
只需登录到您的WordPress管理区域,然后转到插件»添加新内容 。 搜索bbPress,然后从结果中选择bbPress。
Install and activate the plugin. Upon activation, you will see the welcome screen for bbPress.
安装并激活插件。 激活后,您将看到bbPress的欢迎屏幕。
在WordPress中使用bbPress创建论坛 (Creating a Forum with bbPress in WordPress)
Once installed, bbPress adds Forums, Topics and Replies menu items in your WordPress admin.
安装后,bbPress在您的WordPress管理员中添加“论坛”,“主题”和“回复”菜单项。
First, you need to click on Forums » Add New link from the menu. This will take you to a screen similar to the WordPress post edit area.
首先,您需要从菜单中单击论坛»添加新链接。 这将带您到类似于WordPress帖子编辑区域的屏幕。
Provide a title for your forum and enter a little description of it. Then press the publish button.
为您的论坛提供标题,并输入一些描述。 然后按发布按钮。
You can create as many forums as you need for different discussions and topics.
您可以根据需要创建任意数量的论坛,以进行不同的讨论和主题。
在WordPress前端显示bbPress论坛 (Displaying bbPress Forum in the Front End of WordPress)
Now that you have created a few forums, it is time to display those forums on the front end of your WordPress website.
现在您已经创建了一些论坛,是时候在WordPress网站的前端显示这些论坛了。
Create a new WordPress page. Give this page a title, like Forum, Community, Support Forums, etc.
创建一个新的WordPress页面。 给该页面命名,例如论坛,社区,支持论坛等。
After that, simply paste the following shortcode in your page:
之后,只需将以下简码粘贴到您的页面中:
[bbp-forum-index]
[bbp-forum-index]
Don’t forget to click on the publish button to save your changes and make your forum page visible on your website.
不要忘记单击“发布”按钮以保存您的更改并使论坛页面在您的网站上可见。
You can now visit the page in a web browser to see a preview of your forums.
现在,您可以在网络浏览器中访问该页面,以查看论坛的预览。
Next, you need to help users find the forum on your website. To do that, let’s put a link to your forum page on top navigation menu.
接下来,您需要帮助用户在您的网站上找到论坛。 为此,我们在顶部导航菜单上放置一个指向论坛页面的链接。
Go to Appearance » Menus and add the forum page to your navigation menu.
转到外观»菜单,然后将论坛页面添加到导航菜单。
Users can now access the forum index page by clicking on the link in the main menu.
用户现在可以通过单击主菜单中的链接来访问论坛索引页面。
将bbPress与您的WordPress主题集成 (Integrating bbPress with your WordPress Theme)
In most cases, you would probably want to open your forum for new registrations. To do that, you need to open your website for registrations.
在大多数情况下,您可能希望打开论坛进行新注册。 为此,您需要打开您的网站进行注册。
Simply go to Settings » General, and check the box next to “Any one can register” to allow registrations on your website.
只需转到设置»常规 ,然后选中“任何人都可以注册”旁边的框,即可在您的网站上注册。
Don’t forget to click on the save changes button to store your settings.
不要忘记单击“保存更改”按钮来存储您的设置。
Now that your website is open for registration, the first thing that your forum participants would look for is a registration page.
既然您的网站已经可以注册,那么您的论坛参与者所需要寻找的第一件事就是注册页面 。
Let’s make one.
让我们做一个。
Simply create a WordPress page, and give it a title, e.g. Register. Add shortcode [bbp-register]
and publish the page.
只需创建一个WordPress页面,并为其命名即可,例如Register 。 添加简码[bbp-register]
并发布页面。
You can now preview this page. It will show a user registration form to all non-logged in users.
您现在可以预览此页面。 它将向所有未登录的用户显示用户注册表格。
Another page your users would need is the lost password recovery page. This is where they will be recover their lost passwords.
用户需要的另一个页面是丢失的密码恢复页面。 他们将在这里恢复丢失的密码。
Create another WordPress page and give it a title e.g. Lost Password. After that, add this shortcode [bbp-lost-pass]
and publish the page.
创建另一个WordPress页面,并为其命名,例如Lost Password 。 之后,添加此短代码[bbp-lost-pass]
并发布页面。
Finally, you need to add a login form to your website so that forum users can easily login from anywhere on your website.
最后,您需要向您的网站添加一个登录表单 ,以便论坛用户可以轻松地从您网站上的任何位置登录。
bbPress comes with a handful of widgets and one of them is a login form widget.
bbPress带有一些小部件,其中一个是登录表单小部件。
Go to Appearance » Widgets and simply drag and drop Login Widget to your sidebar or any other widget area.
转到外观»小部件 ,然后将“登录小部件”拖放到侧边栏或任何其他小部件区域。
You will be asked to provide the URLs for the registration and lost password pages you created earlier. After entering them you need to click on the Save button to store your widget settings.
系统将要求您提供先前创建的注册页面和丢失密码页面的URL。 输入它们后,您需要单击“保存”按钮来存储您的小部件设置。
Now a login form with links to registration and lost password recovery pages will appear in your sidebar. Logged in users would see their usernames and a logout link instead of the form.
现在,您的侧边栏中将显示一个登录表单,其中包含指向注册和丢失的密码恢复页面的链接。 登录的用户将看到其用户名和注销链接,而不是表格。
管理bbPress论坛设置 (Managing bbPress Forum Settings)
Unlike other popular forum software, bbPress has a very simplified configuration page. To manage settings for your bbPress forums, go to Settings » Forums page.
与其他流行的论坛软件不同,bbPress具有非常简化的配置页面。 要管理bbPress论坛的设置 ,请转至设置»论坛页面。
The default options on this page would work for most forum websites. We’ll take a look at all of them, just in case you want to change anything.
此页面上的默认选项适用于大多数论坛网站。 我们将仔细研究所有这些内容,以防万一您想更改任何内容。
The first option you would see here is to ‘Automatically give registered visitors the participant forum role’. You can select a user role or uncheck the option to manually assign user roles to each user when they register.
您在这里看到的第一个选项是“自动为注册的访问者提供参与者论坛角色”。 您可以选择用户角色或取消选中该选项以在每个用户注册时手动将其分配给每个用户。
The next option adds a 10-second delay between subsequent forum posts to prevent forum flooding and spam. You can increase or decrease the delay period here.
下一个选项在后续论坛帖子之间增加了10秒的延迟,以防止论坛泛滥和垃圾邮件。 您可以在此处增加或减少延迟时间。
The Editing option allows users to edit their forum posts 5 minutes after they publish them. You can uncheck this option but that would prevent your users from correcting spelling errors or edit their posts if they missed something.
“编辑”选项允许用户在发布论坛文章5分钟后对其进行编辑。 您可以取消选中此选项,但这将阻止您的用户纠正拼写错误,或者如果他们错过了某些内容,则可以编辑他们的帖子。
After that, you’ll find the forum features section. From here, you can turn forum features on and off.
之后,您将找到论坛功能部分。 在这里,您可以打开和关闭论坛功能。
Below that, you’ll see forum display features. From here, you can select a bbPress template, number of posts and topics to display on forum pages and inside the forum RSS feed.
在其下,您将看到论坛的显示功能。 在这里,您可以选择bbPress模板,帖子数和主题以显示在论坛页面上以及论坛RSS feed中 。
Finally, you’ll see options to select URL slugs for different sections and forum pages. Slugs are the SEO friendly URL names used by WordPress.
最后,您将看到用于为不同部分和论坛页面选择URL链接的选项。 子弹是WordPress使用的SEO友好URL名称。
The default URL slugs are meaningful and SEO friendly out of the box but if you need to change them, then you can do so here.
默认的URL标记是有意义的并且开箱即用,对SEO友好,但是如果您需要更改它们,则可以在此处进行更改。
Don’t forget to click on the ‘Save changes’ button to store your forum settings.
不要忘记点击“保存更改”按钮来存储您的论坛设置。
bbPress中的用户角色 (User Roles in bbPress)
WordPress comes with its own user role management system which allows you to assign users roles with different permissions.
WordPress带有自己的用户角色管理系统 ,该系统允许您为用户角色分配不同的权限。
bbPress extends the WordPress user roles by adding its own five pre-defined user roles with different capabilities.
bbPress通过添加自己的五个具有不同功能的预定义用户角色来扩展WordPress用户角色。
1. Keymaster – The website owner or the WordPress administrator is automatically assigned the Keymaster role when they install bbPress. A Keymaster can delete and create forums, can create, edit, delete all posts, topics, forums.
1. Keymaster –网站所有者或WordPress管理员在安装bbPress时会自动分配给Keymaster角色。 Keymaster可以删除和创建论坛,可以创建,编辑,删除所有帖子,主题,论坛。
2. Moderators – Users with moderator user role have access to moderation tools, which they can use to moderate forums, topics, and posts.
2.主持人 –具有主持人用户角色的用户可以访问主持工具,他们可以用来主持论坛,主题和帖子。
3. Participants – This is the default user role, participants can create and edit their own topics and posts, they can favorite and subscribe to topics.
3.参与者 –这是默认的用户角色,参与者可以创建和编辑自己的主题和帖子,可以收藏和订阅主题。
4. Spectators – Spectators have a read-only access to public forums, topics, and posts.
4.观众 –观众对公共论坛,主题和帖子具有只读访问权限。
5. Blocked – When a user is blocked all their capabilities are blocked. They can still read publicly viewable topics and posts, but can not participate in the forums.
5.被阻止 –当用户被阻止时,其所有功能都会被阻止。 他们仍然可以阅读公开可见的主题和帖子,但不能参加论坛。
扩展和推广bbPress论坛 (Extending and Promoting Your bbPress Forum)
Now that your bbPress forum is all set up and running. It is time to learn how to extend and promote it.
现在,您的bbPress论坛都已建立并正在运行。 现在该学习如何扩展和推广它了。
Let’s start with the appearance first. bbPress works with any WordPress theme and themes can also add custom styles to bbPress.
让我们从外观开始。 bbPress适用于任何WordPress主题,主题也可以向bbPress添加自定义样式。
All top WordPress themes come with custom bbPress styles to make your forum look beautiful.
WordPress的所有顶级主题都带有自定义bbPress样式,以使您的论坛看起来更漂亮。
For more choices, see our pick of the best WordPress themes for bbPress.
有关更多选择,请参阅我们为bbPress选择的最佳WordPress主题 。
Next, you would want to add new features to your forum so that you can quickly get new members and grow your online community.
接下来,您需要向论坛添加新功能,以便您可以快速获得新成员并发展您的在线社区。
The following are some of the plugins that will help you grow your online forum much quickly.
以下是一些可帮助您快速发展在线论坛的插件。
RafflePress allows you to create viral giveaways and contests in WordPress. These interactive contests and giveaways are a sure-fire way to instantly get a ton of new users to your online forum.
RafflePress允许您在WordPress中创建病毒赠品和竞赛。 这些互动的竞赛和赠品是确保立即吸引大量新用户进入您的在线论坛的一种可靠方法。
See our guide on how to create a viral giveaway contest for more information.
有关更多信息,请参见有关如何创建病毒赠品竞赛的指南。
MemberPress is the best WordPress membership plugin. It allows you to make money online from your forum by adding subscription layers to your online community.
MemberPress是最好的WordPress会员插件 。 它允许您通过向在线社区添加订阅层来从论坛在线赚钱 。
For more information, take a look at our guide on how to make a membership website.
有关更多信息,请参阅有关如何建立会员资格网站的指南 。
Want to know which forum topics and discussions are more popular on your website? MonsterInsights helps you easily track all your website traffic using Google Analytics.
是否想知道哪些论坛主题和讨论在您的网站上更受欢迎? MonsterInsights可帮助您使用Google Analytics(分析)轻松跟踪所有网站流量。
WPForms is the best WordPress contact form plugin. It allows you to easily create beautiful forms for your website. You can also use it to create custom login page, user registration page, or to add surveys and polls to your bbPress forum.
WPForms是最好的WordPress联系人表单插件。 它使您可以轻松地为网站创建漂亮的表单。 您也可以使用它来创建自定义登录页面 ,用户注册页面,或向bbPress论坛添加调查和民意调查 。
We hope that this article helped you learn how to add a forum in WordPress and how to install and configure bbPress. You may also want to see our complete WordPress SEO guide to help you get even more traffic.
我们希望本文能帮助您学习如何在WordPress中添加论坛以及如何安装和配置bbPress。 您可能还希望查看我们完整的WordPress SEO指南,以帮助您获得更多流量。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-add-a-forum-in-wordpress-with-bbpress/