Archived topic
comment customizations - ajax
6 replies · Started by sg on November 2, 2017
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.
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.
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
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!
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?
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~!
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 :)