Hello,
Is there a snippet to allow only vendor role and author of the post to view the comment form and restrict other visitors and guests from reading the comments?
Hi @3dwan,
you can use the following two options:
In this case, the comments will be visible for the roles, however, they'll not be able to post a comment.
The whole comment section can be hidden for the guests by the following CSS code:
body:not(.logged-in) #comments #wpdcom {
display: none !important;
}
Thank you for the fast reply, I will add the css code to hide comments from guests, but how do I hide them from other user roles? I have already defined the settings you mentioned but I want comments to be only visible to the author of the post and user-role because comments will act as agreement on services and I don't want the author name to be visible to subscriber user role
Hello,
I have tried the above snippet and it doesn't work, sorry im not a developer I don't know coding but the above doesn't work.
I am worried if it works it will also disable reviews for products. I need to hide comments for user role on posts only not products.
Thank you a lot on advance
Hello,
Thank you for your reply, if I provided you with the admin access, could you apply the snippet?
Because I have tried to search for comment_template but I couldn't find it.
Waiting for your reply, thank you in advance
Hi @3dwan,
The changes were implemented by our developers. Please check it.
I mean these changes, where can I find them?