The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Guests - Allow to P...
 
Share:
Notifications
Clear all

[Solved] Guests - Allow to Post Comments but Prevent them Seeing Comment List

2 Posts
2 Users
0 Likes
1,165 Views
grabcamber
Posts: 2
Topic starter
(@grabcamber)
New Member
Joined: 2 years ago

I would like guests to be able to post comments, but not to be able to see the comment list. There doesn't seem to be a way to do this?

To allow guests to post comments, two settings must be activated ('Yes' must be selected in each case):

  1. wpDiscuz->Forms->Edit->Allow guests to comment
  2. wpDiscuz->Forms->Edit->Allow guests to view comments

 

The 'Allow guests to view comments' option says underneath in grey text 'If you disable this option, it'll hide the entire section of comments. Neither the comment form nor the comment list will be visible for guests.'

 

It seems odd that the option 'Allow guests to view comments' needs to be selected for guests to be able to post comments. You would think that this option would just disable the comment list. However, it is necessary to select 'Yes', and the grey text underneath the option confirms that this is how the plugin would behave. The comment form is not visible when the option is disabled.

 

Sorry if I'm missing something; has anyone found a secure way around this, which doesn't risk exposing the comment list data to guest users? Or does this need fixing in the next update? Thanks in advance if anyone can help.

 

Other background info:

  • The website doesn't have or need user registration/membership, so we want guests alone to be able to add comments. It's just that we don't want the comment list displaying publicly on the site - we want only admin roles to be able to see the comments.
  • The website uses version 7.3.20. 

 

P.S. absolutely awesome plugin generally - thank you to the developers.

1 Reply
Asti
Posts: 7123
 Asti
Support
(@asti)
Illustrious Member
Joined: 6 years ago

Thank you @grabcamber,

This is designed to work in this way. If the guests don't have permission to view comments, they cannot comment as well. This is the working logic of the option. This is dane to protect the comment section from spam comments. So if the comment won't be visible too many spam comments can be added. 

If you still want to hide the comments from guests and let them comment you can use a custom js code. Example: 

jQuery(document).ready(function(){
       jQuery('body:not(.logged-in) #wpd-threads').remove();
});

This article should be helpful for you:  https://www.wpbeginner.com/wp-tutorials/how-to-easily-add-javascript-in-wordpress-pages-or-posts/

Share: