The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Problems With `comm...
 
Share:
Notifications
Clear all

[Closed] Problems With `comment_post` Hook

5 Posts
2 Users
0 Reactions
981 Views
Posts: 3
Topic starter
(@mert2312)
Active Member
Joined: 4 years ago

Hello. I've been trying to echo a message after comment is posted and tried `comment_post` action that comes with Wordpress, but the message is not echoed on the screen. Also, when the action is registered and a comment is posted, the loader animation shows up but the comment doesn't become visible in the comment list. I can insert into database with that function and hook successfully, but echoing, returning or redirecting doesn't work. I've even tried functions that are confirmed as working, but no luck in echoing anything. I've also tried `wp_comment_insert`action, but I have the same issue. Insertion to database also works with it.

Topic Tags
4 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

@mert2312,

Please show on some screenshot where exactly you'd like to display the message, we'll provide you the right hook you can use. 

3 Replies
(@mert2312)
Joined: 4 years ago

Active Member
Posts: 3

@asti Thank you for your reply. I'm trying to show a pop-up when user posts a comment.

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@mert2312,

in this case, there is no simple solution I can post here there should be some additinal js function, that'll need to be called. 

(@mert2312)
Joined: 4 years ago

Active Member
Posts: 3

@asti would you mind pointing me to the right direction? I've been desperately looking for that everywhere on the web.

Share: