Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1253904

    Hi,

    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?

    #1254042

    Hi Jarmo,

    Yes, you are correct that’s the only thing you need to do.
    Let us know if you have any issues with it.

    Best regards,
    Nikko

    #1254049

    Hi Nikko,

    I did this but it doesn’t work.

    #1254050

    Hi Jarmo,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. 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 ).
    5. Click ” Submit “.
    6. 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.

    Best regards,
    Nikko

    #1254052

    Hi Nikko,

    See the private section

    #1254102

    Hi Jarmo,

    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' ) );

    to:

    wp_list_comments( array( 'type'=> 'comment', 'callback' => 'enfold_inc_custom_comments' ) );

    Let us know if this helps :)

    Best regards,
    Nikko

    #1254294

    Worked for me. Thanks!

    #1254322

    Hi,

    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 :)

    Best regards,
    Yigit

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Override loop comments in child theme’ is closed to new replies.