- This topic has 6 replies, 2 voices, and was last updated 3 years, 6 months ago by Tom.
November 2, 2017 at 9:45 pm #415349sg
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.GP Premium 1.4.3November 3, 2017 at 10:07 am #415695TomLead DeveloperLead 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.November 5, 2017 at 11:55 pm #416892sg
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 ?
thanksNovember 6, 2017 at 12:02 am #416894sg
Hi Tom could you advice me how to achieve this pls
:: the ‘ older comments’ and ‘never comments” ajax page-nav
currently im using hooks : generate_leave_comment & generate_post_comment,
Thanks!November 6, 2017 at 9:06 am #417212TomLead DeveloperLead 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?November 6, 2017 at 9:19 am #417227sg
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~!November 6, 2017 at 10:35 pm #417552TomLead DeveloperLead 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 🙂
- You must be logged in to reply to this topic.