The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Enable comment form for author and user-role
✦
✦
✦
AI is analyzing the discussion...
How-to and Troubleshooting
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
[#614]
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?
Posted : 29/07/2020 10:38 am
(@asti)
Posts: 8284
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
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;
}
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 29/07/2020 12:32 pm
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
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
Posted : 29/07/2020 1:10 pm
(@asti)
Posts: 8284
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@3dwan,
Below is provided an example:
$user = wp_get_current_user();
if ( in_array( 'subscriber', (array) $user->roles ) ) {
comments_template();
}
In this example, the comment section is disabled for the subscriber user role.
The code should be added in the active theme functions.php file.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 29/07/2020 2:05 pm
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
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
Posted : 29/07/2020 3:09 pm
(@asti)
Posts: 8284
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@3dwan,
sorry for the late response.
The code provided by me in this post should be added in the template files of the theme, not in the functions.php file.
For example, in the single.php file, you'll need to find the comments_template(); function and replace it with the code I've provided.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 01/08/2020 1:54 pm
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
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
Posted : 01/08/2020 10:44 pm
(@asti)
Posts: 8284
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@3dwan,
if I provided you with the admin access, could you apply the snippet?
sure, please send it to info[at]gvectors.com email address.
Please don't forget to leave the email subject here to allow us to easily find it.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 07/08/2020 12:22 pm
(@asti)
Posts: 8284
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Hi @3dwan,
The changes were implemented by our developers. Please check it.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 10/08/2020 5:14 pm
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti hello,
I have checked the changes, and nothing changed. All users can view and see comments instead of limiting access to author and vendor
Posted : 10/08/2020 6:28 pm
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
the comment form doesn't appear for other user roles, but any user who posted an article and has author role, can see comments for all articles, he should be able to see comments for articles he wrote only. and users with role vendor can see comments in all articles. Please help me fix this, as we are very close to solving this issue. also please guide me on which file did you implement the snippet for future reference.
Thank you very very much in advance
Posted : 10/08/2020 8:41 pm
(@asti)
Posts: 8284
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@3dwan,
Please help me fix this, as we are very close to solving this issue. also please guide me on which file did you implement the snippet for future reference.
We're really sorry, but there is no easy solution we can provide you. You should ask some developer to do this custom work for you.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 11/08/2020 5:02 pm
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
Np but can you tell me where were the changes made? In which file?
Posted : 11/08/2020 5:17 pm
(@asti)
Posts: 8284
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@3dwan,
There is no only one place where you should make the changes. The changes should be included in several files.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 12/08/2020 1:07 pm
(@3dwan)
Posts: 17
Eminent Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Hi @3dwan,
The changes were implemented by our developers. Please check it.
I mean these changes, where can I find them?
Posted : 12/08/2020 1:56 pm
Super Globals
Options and Features