October 19, 2020 at 11:37 am #1253904
I found this file where I can add extra elements: includes/loop-comments.php
But I want to override this file via my child theme. How can I do this?
Just as simple like placing it like /child-theme/includes/loop-comments.php or do I have to do something else?October 19, 2020 at 4:02 pm #1254042
Yes, you are correct that’s the only thing you need to do.
Let us know if you have any issues with it.
NikkoOctober 19, 2020 at 4:08 pm #1254049October 19, 2020 at 4:09 pm #1254050
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ).
- Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.
NikkoOctober 19, 2020 at 4:14 pm #1254052October 19, 2020 at 5:31 pm #1254102
Thanks for giving us admin access and I apologize I assumed it was similar to loop-index.php.
Can you try to do the following:
1. Open includes/loop-comments.php in your child theme, copy it from line 12 down to the bottom (starting from this code):
function avia_inc_custom_comments($comment, $args, $depth)
2. Paste the code in your child theme’s functions.php and replace avia_inc_custom_comments to enfold_inc_custom_comments (make sure to do this before saving)
3. Delete includes/loop-comments.php in your child theme
4. Copy comments.php from the enfold theme to your child theme and modify line 103:
wp_list_comments( array( 'type'=> 'comment', 'callback' => 'avia_inc_custom_comments' ) );
wp_list_comments( array( 'type'=> 'comment', 'callback' => 'enfold_inc_custom_comments' ) );
Let us know if this helps :)
NikkoOctober 20, 2020 at 10:18 am #1254294October 20, 2020 at 12:02 pm #1254322
Glad Nikko could help! :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
The topic ‘Override loop comments in child theme’ is closed to new replies.