如何允许用户在WordPress中添加收藏夹帖子

Do you want to allow users to add favorite posts in WordPress? Allowing users to add favorite posts offers another way for them to engage with your content. In this article, we will show you how to easily allow users to add favorite posts in WordPress.

是否要允许用户在WordPress中添加喜欢的帖子? 允许用户添加喜欢的帖子为他们提供了另一种与您的内容互动的方式。 在本文中,我们将向您展示如何轻松地允许用户在WordPress中添加喜欢的帖子。

How to Allow Users to Add Favorite Posts in WordPress
为什么要在WordPress中添加收藏夹帖子? (Why Add Favorite Posts in WordPress?)

We are often asked by our users about how to decrease bounce rate and boost user engagement on their WordPress blogs.

用户经常向我们询问有关如何降低跳出率并提高其WordPress博客上的用户参与度的信息。

When most beginners start a WordPress blog, they try to get more comments as a way to boost user engagement.

当大多数初学者创建WordPress博客时 ,他们会尝试获取更多评论 ,以提高用户参与度。

However, most users on your site do not leave comment. This can be easily solved by adding other interactions that do not require much effort.

但是,您网站上的大多数用户不会发表评论。 通过添加其他不需要太多工作的交互,可以轻松解决此问题。

Your users will be more likely to click on a button than writing a comment. Adding post ratings, like buttons, or add to favorite button allows you to offer effortless interactions on your site.

您的用户更有可能点击按钮而不是发表评论。 添加帖子评分 ( 如按钮 )或添加到收藏夹按钮可让您轻松地在网站上进行互动。

Allowing users to add favorite posts, helps registered users revisit their favorite posts. It will also help you understand what kind of content users like on your site.

允许用户添加喜欢的帖子,可以帮助注册用户重新访问他们喜欢的帖子。 它还将帮助您了解用户喜欢您网站上的哪种内容。

You can then show new users what others like the most on your site and get them engaged with your most favorited content.

然后,您可以向新用户显示您网站上其他人最喜欢的东西,并让他们参与您最喜欢的内容。

Having said that, let’s see how to easily allow users to add favorite posts on your WordPress blog.

话虽如此,让我们看看如何轻松地允许用户在您的WordPress博客上添加喜欢的帖子。

允许用户在WordPress中添加收藏夹帖子 (Allow Users to Add Favorite Posts in WordPress)

First thing you need to do is install and activate the WP Favorite Posts plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活WP Favorite Posts插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, you need to visit Settings » WP Favorite Posts to configure plugin settings.

激活后,您需要访问设置»WP收藏夹帖子以配置插件设置。

WP Favorite Posts settings

First option on the settings page is to enable ‘Add to favorite’ option for registered users only. You need to leave this unchecked if you want all visitors to see the ‘Add to favorite’ button.

设置页面上的第一个选项是仅对注册用户启用“添加到收藏夹”选项。 如果要让所有访问者看到“添加到收藏夹”按钮,则需要取消选中此复选框。

Next, you need to choose where to show the ‘add to favorite’ link. The plugin can automatically show it before or after the post content. Advanced users can also choose custom method and use <?php wpfp_link() ?> template tag inside WordPress theme files.

接下来,您需要选择显示“添加到收藏夹”链接的位置。 插件可以在帖子内容之前或之后自动显示它。 高级用户还可以选择自定义方法,并在WordPress主题文件中使用<?php wpfp_link() ?>模板标记。

Now you need to choose the image icon you want to show next to ‘Add to favorite’ link. The plugin comes with a few images that you can use. You can also upload your own image or don’t show any image at all.

现在,您需要选择要显示在“添加到收藏夹”链接旁边的图像图标。 该插件附带了一些您可以使用的图像。 您也可以上传自己的图片或完全不显示任何图片。

After that you can choose the number of posts you would like to show on your favorite posts page. The default option is 20, you can change that if you want.

之后,您可以选择要在自己喜欢的帖子页面上显示的帖子数。 默认选项是20,您可以根据需要更改它。

Lastly, you can enable or disable statistics. You will need to keep it enabled if you want to show most favorited posts in the sidebar widget.

最后,您可以启用或禁用统计信息。 如果要在侧边栏小部件中显示最喜欢的帖子,则需要将其保持启用状态。

Don’t forget to click on the ‘Update Options’ button to store your settings.

不要忘记单击“更新选项”按钮来存储您的设置。

You can now visit any single post on your website and you will see the Add to Favorite link.

现在,您可以访问网站上的任何单个帖子,并且会看到“添加到收藏夹”链接。

Add to favorite link with image icon on a WordPress post
在WordPress中显示最喜欢的帖子 (Showing Most Favorited Posts in WordPress)

You may want to show your most favorited posts in your blog’s sidebar. Here is how you would do that.

您可能希望在博客的侧边栏中显示最喜欢的帖子。 这是您要执行的操作。

Head over to Appearance » Widgets page. Under the list of available widgets you will notice ‘Most Favorited Posts’ widget. You will need to drag and drop this widget to a sidebar. If you need help adding widget, then check out our guide on how to add and use widgets in WordPress.

转到外观»小部件页面。 在可用的小部件列表下,您会注意到“最喜欢的帖子”小部件。 您将需要将此小部件拖放到侧边栏。 如果您需要添加小部件的帮助,请查看有关如何在WordPress中添加和使用小部件的指南。

Adding most favorited posts widget to a sidebar

You can select the number of posts you want to show in the widget. Don’t forget to click on the save button to store your widget settings.

您可以选择要在小部件中显示的帖子数。 不要忘记单击“保存”按钮来存储您的小部件设置。

You can now visit your website to see the most favorited posts in your blog’s sidebar.

现在,您可以访问您的网站,在博客的侧边栏中查看最喜欢的帖子。

Most favorited posts
在WordPress中显示用户最喜欢的帖子 (Showing a User’s Favorite Posts in WordPress)

This plugin stores favorite posts for non-registered users in cookies. For registered users, it saves their favorite posts in your WordPress database.

该插件将非注册用户的收藏帖子存储在cookie中。 对于注册用户,它将他们喜欢的帖子保存在WordPress数据库中。

Here is how you can show each user their favorite posts on your site.

您可以通过以下方式在网站上向每个用户显示他们最喜欢的帖子。

Head over to Appearane » Widgets page and add ‘Users Favorite Posts’ widget to a sidebar.

转到Appearane»小部件页面,然后将“用户收藏的帖子”小部件添加到侧边栏中。

User's favorite posts widget

You can select the number of posts you want to show in the widget. Don’t forget to click on the save button to store your widget settings.

您可以选择要在小部件中显示的帖子数。 不要忘记单击“保存”按钮来存储您的小部件设置。

This is how it looked on our demo site:

这是在我们的演示站点上的样子:

User's favorite posts shown in sidebar widget

You can also show user’s favorite posts in a WordPress post, page, or text widget using the [wp-favorite-posts] shortcode. This is particularly helpful if you want to create a separate page where users can see all their favorite posts.

您还可以使用[wp-favorite-posts] 简码在WordPress帖子,页面或文本小部件中显示用户的收藏帖子。 如果您想创建一个单独的页面,用户可以在其中看到他们所有喜欢的帖子,这特别有用。

We hope this article helped you learn how to allow users to add favorite posts in WordPress. You may also want to see our complete step by step WordPress SEO guide for beginners.

我们希望本文能帮助您学习如何允许用户在WordPress中添加喜欢的帖子。 您可能还希望查看针对初学者的完整分步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视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-allow-users-to-add-favorite-posts-in-wordpress/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值