Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Sometimes you need to diasable the commentfunction on a single post/article because to much harrasement and shitstorm.
I like to know where i can do this and set a message with the reason like:
The comment function in this article is disabled because to much negative posts.
(sorry may english is not the best)
Thanks in advance
Orakel
Hi @orakel,
Please follow the steps below:
1. Disable the “Allow Comments” option. This option is located under the post/page editor in the edit post admin page. Just edit the post and follow these steps:
> Make sure the “Discussions” admin-box is allowed using “Screen Options” in “Edit Post” admin page:
> Find the “Discussions” admin-box below and uncheck the “Allow Comments” option.
2. Use the wpdiscuz_comment_form_closed hook and display the message you want. The example is provided in this doc. In your case, you'll just deed to change the message in the code: https://wpdiscuz.com/docs/codex/actions/wpdiscuz_comment_form_closed/
The support here is wonderfull, thank you very much! I like to make a donation.
My english is too bad, can you explain me, step by step where i have to put in this code?
You are so nice...thank you very much for all the help =)
Orakel
add_action("wpdiscuz_comment_form_closed", function ($post, $currentUser, $commentsCount) { echo "Custom Message"; }, 10, 3);
Is this code also for the functions.php?