Docs
You are viewing:
Product Catalog 1.0
WordPress allows you to create websites, blogs, and share content, services, and products with users on the web. With content being generated daily, such as research reports, courses, and online tutorials, you can monetize your content by setting up a paywall on your website.
A paywall gates your site's premium content on a subscription basis.
With Chargebee's plugin for WordPress, you can implement a paywall on your site and charge users on a subscription basis. It allows you to restrict content based on the subscription your customers have signed up for.
Note:
Ensure you use these tools and their respective versions to set up the plugin:
Chargebee's plugin creates the following in WordPress. These are required to set up content restriction on your site:
Products:
Levels:
Once the plugin is installed, Chargebee will create Levels in WordPress. You can create restrictions as follows:
Chargebee's plugin allows you to set up a content restriction mechanism. You can set restrictions for your pages/posts as follows:
Everyone: All viewers can access the content.
Select Level: Only viewers on a specific Level can access the content. Once this option is selected, you can choose a Level.
As restricted at Category level: Set a Level at the Category level, which applies to all posts/pages in the Category.
As per content shortcodes: Restrict content based on the shortcode used on the page or post. Supported shortcodes are listed below:
Use these shortcodes in your posts/pages to set up restrictions or guide users to sign up:
Action | Shortcode | Description |
---|---|---|
Show content | [cb_content_show level="level_id"] Your content [/cb_content_show] | Displays content to users on the plan associated with the specified Level ID. |
Hide content | [cb_content_hide level="level_id"] Your content [/cb_content_hide] | Hides content from users on the plan associated with the specified Level ID. |
Checkout subscription | [cb_product_subscribe_hosted class="btn" product_id="plan_id"] Subscribe [/cb_product_subscribe_hosted] | Allows users to subscribe by loading Chargebee's in-app checkout. |
Manage subscription | [cb_account_portal class="btn"] Manage Subscription [/cb_account_portal] | Allows users to manage their subscription via Chargebee's self-serve portal. |
Display subscription | [cb_display_subscription] | Displays subscription details to users. |
Show content (guest users) | [cb_not_logged_in] Your content [/cb_not_logged_in] | Displays content to users who are not logged in. |
Show content (paid) | [cb_paid_subscription] Your content [/cb_paid_subscription] | Displays content to users on paid plans. |
Show content (free) | [cb_free_subscription] Your content [/cb_free_subscription] | Displays content to users on free plans. |
Replace "Product ID" in the Product Subscribe shortcode with the Product ID of the plan to represent. The Product ID of a plan is similar to the Plan ID in your Chargebee site.
Replace the "level_id" placeholder with an actual Level ID when using shortcodes. If "level_id" is not specified for the [cb_content_show] shortcode, the content will be shown to all users. Similarly, if "level_id" is not specified for the [cb_content_hide] shortcode, the content will be hidden from all users.
Uninstall the plugin and install the new version. Contact Support to get the latest file for installation. Refer to the new set of shortcodes.
To assign a free plan as the default subscription for all new sign-ups, go to WordPress site > Chargebee > Settings > General and choose an option from the Default Membership Product dropdown. Only "free plans" (zero-dollar plans) can be assigned as a default plan for new sign-ups.
Set a custom message for guests or free plan users accessing gated content. Go to WordPress site > Chargebee > Settings > General and enter a custom restriction message in the text box provided.
The following shortcodes are deprecated:
cb_login_form
cb_registration_form
cb_account_link
cb_update_payment_method_form
cb_product_subscribe
If plans from Chargebee are not imported, try updating the Plan ID in your Chargebee site and sync again.
Yes, it will reflect on your WordPress site. The customer will now see content according to their new plan.
Was this article helpful?