How To Protect wpDiscuz Comments With MemberPress

With MemberPress Rules you can protect your valuable content and display it just to the right members. Still, when it comes to your pages and posts, Rules apply only to the content, while other areas remain visible to everyone.

If you’re using the popular wpDiscuz commenting plugin, you surely noticed that comments your members added are affected by this. This article will show you how to protect them by combining the power of Elementor Pro and MemberPress Rules.

MemberPress Rules And wpDiscuz Issue

MemberPress Rules are a great feature that helps you serve the right content to users with different levels of membership. At the same time, MemberPress rules only protect the post content area.

To add wpDiscuz to your post or pages, you just need to activate it and set it up. Since wpDiscuz overtakes the default WordPress commenting system, it will be displayed in the same location - under the post content. Thus, though you protected your post content using MemberPress rules, the wpDiscuz comments remain visible.

How To Make This Work?

This article will help you use wpDiscuz with Elementor Pro and MemberPress. Thus, before we start, you need to have the following plugins installed and activated on your website:


Create Elementor Single Post Template

To start, you need to set your single post template using Elementor's Theme Builder:

Step 1 - Navigate to Dashboard > Templates > Theme Builder. Here, click on “Single Post” and then on the “Add New” button;

Elementor Single Post Template

Step 2 - Design your template by adding widgets you want to display like post title, post content, etc.

Step 3 - In the end, add the "Post Comments" widget. Make sure to add the "Post Comments" widget to the separate section. This will add the core comments feature to your template.

Elementor Post Comments Widget

On the front-end, wpDiscuz will take over and display its form over the core comments. On the front-end, this will look the same as with your default posts (unless you use different styling);

Using wpDiscuz with Elementor Template, Front-end

Step 4 - Once you’re done, click “Publish”. Next, you will see the publish settings popup asking you to set where would you like your new template to be applied. You can set the condition to all posts or choose a different setup based on your needs. Click on the “Save & Close” button to finish the template setup.

Elementor Template Conditions

You can apply this template to all posts, posts belonging to a specific category, or just certain posts types.

Apply MemberPress Rules To The Widget


Let’s now continue editing your template, and apply your MemberPress rule to the comments section:

Step 5 - Click on the six-dot icon on the section containing the "Post Comments" widget. In the settings panel, you will notice a "MemberPress" tab;

Adding MemberPress Rules to Elementor Widget

Step 6 - Click on the tab, and under the "MemberPress Rule" dropdown, select the rule you wish to apply to these posts;

Post content and wpDiscuz comments section protected by the MemberPress Rule

This will apply the rule to the section containing the comments in your posts template. As a result, your content will be protected by MemberPress Rule directly, and your comments section will be protected by protecting the Elementor section.

In addition, you can find more information on working with Elementor widgets and MemberPress in the MemberPress Elementor Add On article.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.