您想向您网站上的用户显示帖子总数、评论、注册用户等统计信息吗?在本文中,我们将向您展示如何在 WordPress 网站上显示简单的博客统计信息。
您想向网站上的用户显示统计信息,例如帖子总数、评论数、注册用户数等吗?在本文中,我们将向您展示如何在 WordPress 网站上显示简单的博客统计信息。

为什么要在WordPress网站上显示博客统计信息? (Why Show Blog Stats on Your WordPress Site?)
Building an online community can be a bit difficult for new websites. 获得更多流量 and 增加用户花费的时间 on your website requires effort and patience.
对于新网站而言,建立在线社区可能会有些困难。 获得更多流量并增加用户在您的网站上花费时间需要付出努力和耐心。
Simple blog stats like the number of registered users, posts, and comments can show other users that your site is growing fast. It encourages 用户参与度 and builds trust.
简单的博客统计信息(例如注册用户数,帖子和评论)可以向其他用户表明您的网站正在快速发展。 它鼓励用户参与并建立信任。
It also allows you to easily monitor your site’s growth and plan strategy. For example, if your comments are low, then you can try to 获得更多对您的帖子的评论. If you 允许用户注册, then you can do more to encourage more users to register.
它还使您可以轻松地监视站点的增长和计划策略。 例如,如果您的评论很少,那么您可以尝试获得更多对您的帖子的评论 。 如果您允许用户注册 ,那么您可以做更多的事情来鼓励更多的用户注册。
话虽如此,让我们来看看如何在 WordPress 网站上轻松显示简单的博客统计信息。
话虽如此,让我们来看看如何在 WordPress 网站上轻松显示简单的博客统计信息。
影片教学 (Video Tutorial)
如果您不喜欢该视频或需要更多说明,请继续阅读。
如果您不喜欢该视频或需要更多说明,请继续阅读。
在WordPress中添加简单的博客统计信息 (Adding Simple Blog Stats in WordPress)
First thing you need to do is install and activate the 简单的博客统计 plugin. For more details, see our step by step guide on 如何安装 WordPress 插件.
您需要做的第一件事是安装并激活简单的博客统计插件。 有关更多详细信息,请参阅有关如何安装 WordPress 插件步指南。
Upon activation, you need to visit 设置 » 简单博客统计 to configure plugin settings.
激活后,您需要访问设置 » 简单博客统计以配置插件设置。

Simple Blog Stats allows you to add blog stats using 短代码 and 模板标签.
简单的博客统计信息允许您使用短代码和模板标签添加博客统计信息。
You can display all the stats by adding a single shortcode [sbs_blog_stats]
in a post, page, or a 侧边栏小部件. It will display a list of all your blog stats.
您可以通过在帖子,页面或在侧边栏小部件中添加单个简码[sbs_blog_stats]
来显示所有统计信息。 它将显示所有博客统计信息的列表。

您还可以使用不同的短代码显示特定的统计数据,例如帖子总数。
您还可以使用不同的短代码来显示特定的统计数据,例如帖子总数。
单击短代码选项卡将其展开,您将看到可以使用的短代码的完整列表。
单击“短代码”选项卡将其展开,您将看到可以使用的短代码的完整列表。

每个短代码下面都有一个说明,解释它将显示哪些信息。您还将看到两个文本字段,其中包含它将在信息之前和之后添加的 HTML。
每个短代码下面都有一个说明,解释它将显示哪些信息。您还将看到两个包含 HTML 的文本字段,它们将添加在信息之前和之后。
For example using the shortcode [sbs_comments]
will output this HTML:
例如,使用简码[sbs_comments]
将输出以下HTML:
<span class="sbs-count-comments">135</span>
<span class="sbs-count-comments">135</span>
You can then use the .sbs-count-comments
class to 添加自定义 CSS styles of your own. You can also change the <span class="sbs-count-comments"> </span>
to anything you want.
然后,您可以使用.sbs-count-comments
类添加自己的自定义CSS样式。 您还可以将<span class="sbs-count-comments"> </span>
更改为所需的任何内容。
不要忘记单击“保存设置”按钮来存储您的更改。
不要忘记单击“保存设置”按钮来存储您的更改。
这是插件提供的短代码列表以及说明。
这是插件提供的短代码列表以及说明。
[sbs_posts]
displays total number of posts on your site.[sbs_posts]
显示您网站上的帖子总数。[sbs_pages]
displays total number of pages on your site.[sbs_pages]
显示您网站上的总页数。[sbs_drafts]
shows total number of drafts on your site.[sbs_drafts]
显示您网站上的草稿总数。[sbs_comments]
shows Total number of comments including those approved and those pending approval.[sbs_comments]
显示评论总数,包括已批准和未批准的评论。[sbs_moderated]
shows number of comments in pending approval.[sbs_moderated]
显示待审批的评论数。[sbs_approved]
shows number of approved comments.[sbs_approved]
显示已批准评论的数量。[sbs_users]
displays total number of registered users on your site[sbs_users]
显示您网站上的注册用户总数[sbs_cats]
shows total number of categories[sbs_cats]
显示类别总数[sbs_tags]
shows total number of tags.[sbs_tags]
显示标签总数。[sbs_updated]
shows last updated date and time[sbs_updated]
显示上次更新的日期和时间[sbs_latest_posts]
shows latest post[sbs_latest_posts]
显示最新帖子[sbs_latest_comments]
shows latest comments[sbs_latest_comments]
显示最新评论[sbs_blog_stats]
displays all blog stats in a bulleted list.[sbs_blog_stats]
在项目符号列表中显示所有博客统计信息。
某些短代码可能会显示您可能不想显示的信息,例如草稿数量、待批准的评论、类别和标签的数量。
某些短代码可能会显示您可能不想显示的信息,例如草稿数、待批准的评论、类别和标签。
But you can still create a list of blog stats using individual shortcodes. These shortcodes also come in handy when you just want to show specific stats like 评论总数 or total number of users on your WordPress site.
但是您仍然可以使用单个短代码创建博客统计信息列表。 当您只想显示特定统计信息(例如WordPress网站上的评论总数或用户总数)时,这些短代码也很方便。

That’s all, we hope this article helped you learn how to show simple blog stats on your WordPress site. You may also want to see our list of 适合 WordPress 用户的 7 个最佳分析解决方案.
就这样,我们希望本文能帮助您学习如何在WordPress网站上显示简单的博客统计信息。 您可能还想查看对于 WordPress 用户的7 个最佳分析解决方案列表。
If you liked this article, then please subscribe to our YouTube 频道 for WordPress video tutorials. You can also find us on 推特 and Facebook.
如果您喜欢这篇文章,请订阅我们的YouTube 频道 WordPress视频教程。 您也可以在推特和Facebook上找到我们。
翻译自: https://www.wpbeginner.com/plugins/how-to-show-simple-blog-stats-on-your-wordpress-site/