AI Assistant
Notifications
Clear all

Message to inform user that the comment is closed

5 Posts
3 Users
0 Reactions
2,696 Views
(@pyue6299)
Member Customer
Joined: 8 years ago
Posts: 53
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
  [#2815]

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



   
Quote
Rina
 Rina
(@arina)
Support Team Registered
Joined: 12 years ago
Posts: 101
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
 

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
}


   
ReplyQuote
(@pyue6299)
Member Customer
Joined: 8 years ago
Posts: 53
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
 

thanks, that's work!



   
ReplyQuote
(@pyue6299)
Member Customer
Joined: 8 years ago
Posts: 53
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
 

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?



   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 8 years ago
Posts: 6645
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
 

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. 



   
ReplyQuote
Share:
Scroll to top