Hiding wpDiscuz comments on a membership site running WP eMember

There is a glitch we found when developing a membership site using WP eMember and using the fantastic commenting system wpDiscuz: the comments on protected pages were not being hidden by WP eMember even though we explicitely protected them in the system settings.

WP eMember successfully hides standard WordPress comments, but we really wanted all the extra features of wpDiscuz, so we had to find a workaround.

After some complicated solutions that caused more problems than it was worth, the final solution was simple and elegant.

We use the Genesis framework here, but this code will work in any functions.php file.

function emember_fns() {
    remove_post_type_support( 'post', 'comments' );

Because we use custom post types in our system, we replaced ‘post' on line 7 with our cpt name. You can do a series of these in a row, if you have multiple page types with comments you want to hide (post, page, any custom post type.)

Get Sagely

Emails for running your online business and thriving
 during these changing times.

Related Articles

April 9, 2019

If you already have a great PDF giveaway for your subscribers, you've probably set up your autoresponder to fire off a link to the free resource upon subscription. It's easy peasy, and everyone is ...

Read More
Sharing your paid content without “giving it away”

May 3, 2018

About a year ago we started a small test / pet project and ran it privately on a shared hosting account. We brought in a contractor to do some development on it for us, ...

Read More
Malware: the reason not to download premium widgets from questionable sources

Want Results?