Hey Guys,
I’ve added the loop-comments.php to an includes folder in my child theme and made edits with no result. When checking to see if the changes I made were working I was sure to clear my cache/cookies and also opened the web page in a new Chrome Incognito window to try and make sure I was viewing a fresh page with the changes. Still no result.
However, when I make the same exact edits to the parent theme loop-comments.php file I get the desired result. The only other includes file that I have copied over and edited in my child theme is the loop-index.php and when I make changes to this file as part of my child theme it works fine…
I was curious if the changes I made to the loop-index.php could someone be conflicting/preventing the changes from my loop-comments.php from working, so I temporarily removed the loop-index.php from my child theme and the changes to my loop-comments.php still weren’t working.
Any ideas as to why I can’t edit the loop-comments.php as part of my child theme?
Thanks for your help!
Hey Redsand747!
That file is a function and not an actual template part. So you would add that function into your child functions.php file. Unfortunately it isn’t correctly wrapped in an check to make sure it hasn’t been called already so adding that function in to your child theme would actually break things.
So for right now, you would need to duplicate the comments.php and then where it calls the avia_inc_custom_comments function change that to call your own custom named function that has been customized and included into your functions.php or included as a separate file.
I’ll tag the function for Kriesi to wrap in a if exists check so its a bit easier to override in a child theme in the future.
Regards,
Devin
Thanks Devin! That definitely explains some things. I appreciate the reply.