[Support request] comment customizations – ajax

Home Forums Support [Support request] comment customizations – ajax

Home Forums Support comment customizations – ajax

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #415349
    sg

    Hi tom,
    i am in the process on ajaxifying the commnent form .

    i would nee to change some part of the comment templates classes and types.

    example : currently it is :

    <span class="reply">| <a rel="nofollow" href="=site.com?replytocom=3#respond">Reply</a></span>

    i need to change this span to div. where should i look at please guide.

    thanks.

    #415695
    Tom
    Lead Developer
    Lead Developer

    Currently you would have to overwrite this entire function: https://github.com/tomusborne/generatepress/blob/master/inc/template-tags.php#L89-L147

    Copy it all, and add it to your child theme, then make the adjustment.

    #416892
    sg

    Thanks Tom , Btw i also would like to edit the comment template .
    Can i just copy the comment.php and put it in my child theme folder to give priority ?

    thanks

    #416894
    sg

    Hi Tom could you advice me how to achieve this pls

    1. https://prnt.sc/h6siid
    :: the ‘ older comments’ and ‘never comments” ajax page-nav

    currently im using hooks : generate_leave_comment & generate_post_comment,

    Thanks!

    #417212
    Tom
    Lead Developer
    Lead Developer

    Yes, adding the comments.php file in your child theme is the right way to edit the file.

    Not sure I understand, you’re trying to load the next/previous page using AJAX?

    #417227
    sg

    How about GP/inc/template-tags.php . can copy to childtheme/inc/template-tags.php too ?
    i understand most of the functions are at template-tags.php .

    Next and Prev is part of the core theme ? i didnt ge to see it .just confuse about this feature. thanks~!

    #417552
    Tom
    Lead Developer
    Lead Developer

    No, you don’t want to overwrite that entire file. You want to overwrite individual functions by adding the entire function with the function_exists() wrapper into your child theme: https://github.com/tomusborne/generatepress/blob/1.4/inc/template-tags.php#L11-L69

    Yes, the next/prev links are built into the theme, inside the function I highlighted above.

    Let me know if you need more info 🙂

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