Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum   wpForo Support Forum

Can we password protect comments?  

  RSS

igkteam
(@igkteam)
Member Customer
Joined: 1 year ago
Posts: 5
23/03/2019 1:16 pm  

I am using wp emember for my membership site and want to use this plugin and its addons for that and other member sites.

Unfortunately the comments arent hidden - this plugin ignores emember code that hides the native WP comment forms. I'm sure someone has asked about membership sites before. Any ideas?


Quote
Topic Tags
Astghik
(@astghik)
Support Team Admin
Joined: 3 years ago
Posts: 4382
23/03/2019 1:30 pm  

Hi @igkteam,

Could you please navigate to Dashboard > Comments > Forums admin page, make sure you've disabled commenting for all other roles. More info here:

https://wpdiscuz.com/docs/wpdiscuz-documentation/getting-started/custom-comment-form/comment-form-settings/#disable_commenting_for_roles


ReplyQuote
igkteam
(@igkteam)
Member Customer
Joined: 1 year ago
Posts: 5
23/03/2019 1:42 pm  

Thanks @astghik, the comment form is publicly visible on a protected page. Take a look at my screenshot and settings.

Screen Shot 2019 03 22 at 11.40.54 PM
Screen Shot 2019 03 22 at 11.37.57 PM

ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 3 years ago
Posts: 4382
23/03/2019 1:59 pm  

ok @igkteam,

I'm sorry, but we don't familiar with this plugin. This depends on how the plugin disabled the comments.

We can debug and try to find some solution for you if you install and activate the Duplicator — WordPress Migration Plugin, backup your WordPress site and send it to info[at]gvectors.com email address to allow us to check it. 


ReplyQuote
igkteam
(@igkteam)
Member Customer
Joined: 1 year ago
Posts: 5
23/03/2019 2:15 pm  

Thank you @Astghik. What membership plugins does this system work with well?

I'm sorry, I can't send you a copy of my site, but is there a place you can direct me in the plugin code to make those edits myself?


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 3 years ago
Posts: 4382
23/03/2019 2:54 pm  

no problem @igkteam,

just make sure the function that shows/hides the comments use the comments_template() function. I mean that the manipulations should be done with this function. 

I've found some articles that should be helpful for you, please check them out: 

https://barn2.co.uk/password-protect-wordpress-plugins/
https://wordpress.org/support/article/using-password-protection/
https://themeisle.com/blog/password-protect-wordpress/


ReplyQuote
igkteam
(@igkteam)
Member Customer
Joined: 1 year ago
Posts: 5
23/03/2019 4:17 pm  

@Astghik Thank you. I'll take a look.


ReplyQuote
igkteam
(@igkteam)
Member Customer
Joined: 1 year ago
Posts: 5
24/03/2019 3:05 am  

Hi @Astghik,

Just wanted to loop back with a solution on this in case someone else has a similar issue. (The links you provided weren't helpful. They were not about protecting content using membership sites.)

The way to solve this is to create unique loops for all the pages (single.php and archive.php) and to hide the comment form behind the code that checks if user is logged in.

In my case, I use Genesis, and this is the code for the single-mycustomposttype.php page (replace mycustomposttype with whatever CPT you've created):

remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_do_custom_loop' );

function child_do_custom_loop() { 
 if(wp_emember_is_member_logged_in()){ 	
if (have_posts()) : while (have_posts()) : the_post(); >> output title and content (the html tags here mess with my code, so i'm just posting pseudo code for this bit << comments_template(); //make sure you call it inside the loop, and inside the "if you're logged in" check. endwhile; endif; }else{ header("Location: /"); // I kick people to the login page if they aren't logged in, so there's no partial page view at all. exit();
}
}
genesis();

Astghik liked
ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 3 years ago
Posts: 4382
25/03/2019 2:50 pm  

Thank you @igkteam for sharing the code. 

 I really appreciate you taking a time and share this information. 


ReplyQuote
Share:
Scroll to top
0

Your Cart