Archived topic
Hook before (or after) comments
5 replies · Started by Mathieu on February 23, 2020
Hi,
I am trying to insert a block of code after a comments. I see that the comment if being displayed with the « generate_comment » function but I am unable to hook myself or filter that process.
Is there a way?
Regards,
Hi there,
There are several hooks in the comments section:
https://docs.generatepress.com/article/hooks-visual-guide/#single-post
Let me know if this helps :)
Yup. I saw those, but there's none that allows to filter what is happening between two comments.
Hi there,
This might hold the answer: https://wordpress.stackexchange.com/a/328155
We can't edit the wp_list_comments() function directly without overwriting the template file, so you'll want to go ahead with the "The wp_list_comments_args filter" section of the answer as well.
Oh yeah! Tom again and again... Thanks buddy.
Pretty much everything is customizable, it's crazy.
Have a nice day.
Glad I could help! :)