[Resolved] Hook before (or after) comments

Home Forums Support [Resolved] Hook before (or after) comments

Home Forums Support Hook before (or after) comments

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1174526
    Mathieu

    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,

    #1174655
    Leo
    Staff
    Customer Support

    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 🙂

    #1174656
    Mathieu

    Yup. I saw those, but there’s none that allows to filter what is happening between two comments.

    #1174781
    Tom
    Lead Developer
    Lead Developer

    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.

    #1175116
    Mathieu

    Oh yeah! Tom again and again… Thanks buddy.

    Pretty much everything is customizable, it’s crazy.

    Have a nice day.

    #1175463
    Tom
    Lead Developer
    Lead Developer

    Glad I could help! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.