wordpress上传限制_如何将内容限制为WordPress中的注册用户

wordpress上传限制

Do you want to restrict some of your content to registered or paid users only? Often bloggers use subscriptions or one-time payment model to monetize content on their websites. In this article, we will show you how to restrict content to registered users in WordPress.

您是否要只将某些内容限制为注册用户或付费用户? 博客通常会使用订阅或一次性付款模式来通过其网站上的内容获利。 在本文中,我们将向您展示如何将内容限制为WordPress中的注册用户。

Restricting content to paid and registered users in WordPress

We will be using Restrict Content Pro which we believe is an awesome plugin to create a full fledged membership website with paid subscriptions.

我们将使用Restrict Content Pro (我们认为这是一个很棒的插件)来创建具有付费订阅的完整会员网站。

为什么要使用Restrict Content Pro? (Why Use Restrict Content Pro?)

Restrict Content Pro is the premium version of an awesome free plugin with the same name Restrict Content.

Restrict Content Pro是一个很棒的免费插件的高级版本,具有相同的名称Restrict Content

If you do not want to purchase the pro version, then you can simply download the free version which has limited support and features.

如果您不想购买专业版,则只需下载具有有限支持和功能的免费版。

Here is why we have chosen Restrict Content for this guide:

这就是为什么我们选择本指南的“限制内容”的原因:

  • Restrict Content Pro is extremely easy to install, set up and use.

    Restrict Content Pro非常易于安装,设置和使用。
  • The code behind the plugin is clean and poetic.

    插件背后的代码干净整洁。
  • You can create unlimited subscription packages with multiple levels

    您可以创建多个级别的无限订阅包
  • You can accept payments using PayPal, Stripe, Braintree, and 2Checkout.

    您可以使用PayPal,Stripe,Braintree和2Checkout接受付款。
  • It allows you to easily create login, signup, user account pages.

    它使您可以轻松创建登录,注册,用户帐户页面。
  • You can create unlimited number of discount codes.

    您可以创建无限数量的折扣代码。
  • The easy to use reporting shows you how your site is performing.

    易于使用的报告向您展示了网站的运行情况。
在WordPress中设置Restrict Content Pro (Setting up Restrict Content Pro in WordPress)

First thing you need to do is install and activate Restrict Content Pro. Upon activation, this plugin adds a new menu item labeled ‘Restrict’ in your WordPress admin sidebar.

您需要做的第一件事是安装并激活Restrict Content Pro 。 激活后,此插件会在WordPress管理员侧边栏中添加一个标记为“限制”的新菜单项。

Before we move on to plugin settings, lets start by creating a sign in, register, and manage subscriptions pages in WordPress.

在继续进行插件设置之前,让我们先在WordPress中创建登录,注册和管理订阅页面。

First page you need to create is the login page.

您需要创建的第一页是登录页面。

Simply go Pages » Add New to create a new WordPress page. You can give your page any title that you want and enter [login_form] shortcode in the content area. After that, go ahead and publish your page.

只需转到Pages»Add New创建一个新的WordPress页面。 您可以为页面提供所需的任何标题,然后在内容区域中输入[login_form]简码。 之后,继续发布您的页面。

Repeat the procedure to create a registration page with [register_form] shortcode in it.

重复该过程以创建一个带有[register_form]短代码的注册页面。

When a user signs up for a subscription plan, they will be redirected to a confirmation page. This could be any page on your website with any content. You can simply create a page thanking users for signing up on your website. This page does not need any shortcode.

当用户注册订阅计划时,他们将被重定向到确认页面。 这可以是您网站上任何内容的任何页面。 您可以简单地创建一个页面,感谢用户在您的网站上注册。 此页面不需要任何简码。

Lastly, you need to create a page where users will be able to see their subscription plan and account details. Create a page with the shortcode [subscription_details] to display user subscription details.

最后,您需要创建一个页面,用户可以在其中查看其订阅计划和帐户详细信息。 用短代码[subscription_details]创建一个页面,以显示用户订阅的详细信息。

Once you have created the required pages, it is time to set up Restrict Content Pro settings.

创建所需的页面后,就可以设置Restrict Content Pro设置了。

Go to Restrict » Settings, and you will land on the plugin’s General settings page.

转到“ 限制”»“设置” ,您将进入插件的“ 常规设置”页面。

Restrict Content Pro - General settings page

The first option here is to provide your plugin license key which is required for plugin updates and support.

这里的第一个选项是提供插件许可证密钥,这是插件更新和支持所必需的。

Next, you need to select your registration, success, account management, and billing update pages.

接下来,您需要选择注册,成功,帐户管理和帐单更新页面。

After that, you need to click on the payments tab to configure your payment gateway. You will be asked to choose a currency and then select your payment gateways. Yes, you can have more than one.

之后,您需要点击付款标签以配置您的付款网关。 系统将要求您选择一种货币,然后选择您的付款方式。 是的,您可以拥有多个。

You will see a checkbox to enable sandbox mode. Keep it checked until your site is ready for launch and accept payments.

您将看到一个启用沙盒模式的复选框。 对其进行检查,直到您的网站可以启动并接受付款为止。

Setting up payments in Restrict Content Pro

Each payment gateway has different configuration settings. You will need to provide your PayPal email address for PayPal Standard. You will need API keys if you are using PayPal Pro or Express. Similarly, you will need API keys for other gateways too. You can obtain these keys by logging into your account on your payments service provider.

每个支付网关具有不同的配置设置。 您需要提供PayPal Standard的PayPal电子邮件地址。 如果您使用的是PayPal Pro或Express,则需要API密钥。 同样,您还将需要其他网关的API密钥。 您可以通过登录付款服务提供商的帐户来获取这些密钥。

The emails tab on the settings page allows you to modify the emails sent out by the plugin. If you are having trouble recieving emails, then check out our guide on how to fix WordPress not sending emails issue.

通过设置页面上的电子邮件标签,您可以修改插件发送的电子邮件。 如果您在接收电子邮件时遇到问题,请查看有关如何解决WordPress不发送电子邮件的问题的指南

Misc settings

There are some important options available under the Misc tab on settings page. You can setup login page redirects, disable account sharing, Form CSS, send IPN emails, and setup reCAPTCHA for registration form to prevent spam registrations.

在“设置”页面上的“其他”选项卡下有一些重要选项。 您可以设置登录页面重定向,禁用帐户共享,表单CSS,发送IPN电子邮件以及为注册表单设置reCAPTCHA以防止垃圾邮件注册

在Restrict Content Pro中创建订阅级别 (Creating Subscription Levels in Restrict Content Pro)

Now we are ready to create Subscription levels for your restricted content. As the name suggest, it allows you to create different level of subscriptions for your content.

现在,我们可以为您的受限内容创建订阅级别。 顾名思义,它允许您为内容创建不同级别的订阅。

For example, you can create a subscription level ‘Premium’ and set a price for it. When you are restricting content on your website, you will be able to choose the subscription level a user must have in order to access the restricted content.

例如,您可以创建订阅级别“ Premium”并为其设置价格。 当您限制网站上的内容时,您将能够选择用户访问受限内容所必须具有的订阅级别。

Adding new subscription level in Restrict Content Pro

Creating a subscription level in Restrict Content Pro is simple. Give your subscription level a title, description and set a price for it. You can set the price to zero if you want to create a subscription level for registered non-paying users.

在Restrict Content Pro中创建订阅级别很简单。 给您的订阅级别一个标题,描述并为其设置价格。 如果要为注册的非付费用户创建订阅级别,可以将价格设置为零。

You can choose the duration of a subscription level or set it to 0 to make the duration unlimited. Lastly, you need to set the status to Active, so this subscription plan is active and available on sign up form. Like this:

您可以选择订阅级别的持续时间或将其设置为0以使持续时间不受限制。 最后,您需要将状态设置为“活动”,以便此订阅计划处于活动状态,并且可以在注册表单上使用。 像这样:

Registration page with your Restrict Content Pro subscription levels
使用Restrict Content Pro限制WordPress中的内容 (Restricting Content in WordPress using Restrict Content Pro)

Restrict Content Pro allows you to restrict content on a post by post basis. Under each new post, custom post type, or page, you will see a Restrict this content box with options to control who can see that particular post.

限制内容Pro允许您逐个帖子地限制内容。 在每个新帖子,自定义帖子类型或页面下,您将看到“限制此内容”框,其中包含用于控制谁可以看到该特定帖子的选项。

Restricting content for a post in WordPress

You can choose to restrict content based on user’s role, access, or subscription level. You can even hide contents within a post using the restrict shortcode like this:

您可以选择根据用户的角色,访问权限或订阅级别来限制内容。 您甚至可以使用limit短代码隐藏帖子中的内容,如下所示:

[restrict] Your restricted content goes here... [/restrict]

[restrict] Your restricted content goes here... [/restrict]

在Restrict Content Pro中管理会员资格 (Managing Memberships in Restrict Content Pro)

To manage memberships in Restrict Content Pro, go to Restrict » Members. You can click on each member to view their membership details, payments received, and the status of their account.

要在“限制Content Pro”中管理成员资格,请转到“ 限制»成员” 。 您可以单击每个成员以查看其成员详细信息,已收到的付款以及其帐户状态。

You can also deactivate a member’s subscription at any time. This will not delete their account from your website however their subscription will be canceled, and they will be required to renew it.

您也可以随时停用会员的订阅。 这不会从您的网站上删除他们的帐户,但是他们的订阅将被取消,并且需要对其进行续订。

Manage members in Restrict Content Pro

You can manage payments by going to Restrict » Payments. This will show you the payments you have received. With each payment, you will see the user name, their subscription plan, amount and date. All the payment data can also be exported in CSV format under Restrict » Export page.

您可以转到“ 限制»付款”来管理付款 。 这将显示您已收到的款项。 每次付款时,您都会看到用户名,他们的订阅计划,金额和日期。 还可以在“ 限制”»“导出”页面下以CSV格式导出所有付款数据。

Payments overview
使用Restrict Content Pro为订阅添加折扣代码 (Adding Discount Codes For Subscriptions with Restrict Content Pro)

Restrict Content Pro allows you to offer discount codes for your promotional activity to increase user signups.

Restrict Content Pro允许您为促销活动提供折扣代码以增加用户注册。

Adding a discount code is very simple. Go to Restrict » Discount Codes and simply fill in the form to create a new discount code. You can offer a flat amount discount, or a percentage discount. You can also set an expiration date for each discount code you create, and even limit the number of times a discount code can be used.

添加折扣代码非常简单。 转到限制»折扣代码,然后只需填写表格即可创建新的折扣代码。 您可以提供固定金额的折扣或百分比折扣。 您还可以为创建的每个折扣代码设置有效期,甚至可以限制使用折扣代码的次数。

Offering discount codes in Restrict Content Pro

We hope that this article helped you restrict content to registered users with WordPress and Restrict Content Pro. You may also want to see our comparison of 5 best drag and drop page builders for WordPress.

我们希望本文能帮助您使用WordPress和Restrict Content Pro将内容限制为注册用户。 您可能还想看看我们对WordPress5种最佳拖放页面构建器的比较

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/wp-tutorials/how-to-restrict-content-to-registered-users-in-wordpress/

wordpress上传限制

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值