Hi team
I would like to see how can i show a message to my user informing them that when the comment is closed.
Currently, i set my comment to be closed within 2 days after the post has been published, i want to display a message to my user after the comment has been closed. Please help thanks!
Regards
Patrick
Hi @pyue6299,
There is no any option for this purpose. Please use the following code, put it in your current active theme functions.php file.
add_action('comment_form_closed' , 'my_blog_commenting_colsed');
function my_blog_commenting_colsed(){
?>
<div> Enter your message here! </div>
<?php
}
thanks, that's work!
Hi I just discovered that, although the script is working as it should, but only to the extend that the post has comment. If there is no comment on it, the script will not run? i want it to run regardless the post has comment or not, any clue?
Hi pyue6299,
This is native Wordpress working logic. If you disable wpDiscuz it'll work the same way. I'm really sorry, but wpDiscuz cannot change this logic.