Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #803917

    Hi,

    I just created a Child theme of Enfold.
    I did it with the help of

    It means that I used the “Import Parent Theme Settings” button because I previously added and changed some lines in the “comments.php” and “functions.php” files of Enfold.
    Everything works fine now but what do I have to do to keep my site working as it does now after a possible “Theme Update” ?
    I suppose that when the “comments.php” and “functions.php” files will be updated I’ll have some issues…

    #803920

    Hey Blaise,

    Please cut only the changes you made on parent themes functions.php file and paste them into your child themes functions.php file and then copy modified comments.php file to your child theme :)
    Also, for translations see – http://kriesi.at/documentation/enfold/child-theme-translations/ and for modified ALB elements see – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    Best regards,
    Yigit

    • This reply was modified 7 years, 5 months ago by Yigit.
    #803924

    Hi Yigit

    I copied this in the functions.php file of the child theme, in order to have the comments displayed in descending order of dates :

    add_action( ‘ava_after_main_menu’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    if (!function_exists(‘iweb_reverse_comments’)) {
    function iweb_reverse_comments($comments) {
    return array_reverse($comments);
    }
    }
    add_filter (‘comments_array’, ‘iweb_reverse_comments’);

    But when I do that, I get this error message when I refresh the page :
    Fatal error: Cannot redeclare enfold_customization_header_widget_area() (previously declared in /htdocs/wp-content/themes/enfold-child/functions.php:10) in /htdocs/wp-content/themes/enfold/functions.php on line 570

    #803937

    Hi!

    It seems like you are adding function “enfold_customization_header_widget_area” twice in your child themes functions.php file. Please go to wp-content/themes/enfold-child/functions.php file and make sure that is not the case.

    Cheers!
    Yigit

    #803942

    Hi Yigit,

    You’re right, in a way.
    The fact that I put it in the functions.php of the child as I let it also in the functions.php of Enfold parent created a conflict !
    Now it’s working great :-)

    Just one more thing.
    As you can see on my test page
    http://latransition.be/
    I placed the comment form above the comments. But I’d like to have a bit of room between the button of the form and the first comment.
    How could I do that ?

    #803945

    Hey!

    Yes, my bad. I realised i said “copy” instead of “cut”. Will edit my post :)

    Please add following code to Quick CSS

    .comment_container {
        margin-bottom: 50px;
    }

    Best regards,
    Yigit

    #803950

    Wonderful !

    Still another detail ;-)
    Is it possible to remove the link attached to the date and time of the comment ?

    #803951

    Hey!

    Yes, please add following code to Quick CSS as well

    .comment-meta.commentmetadata {
        pointer-events: none;
    }

    Regards,
    Yigit

    #803954

    Thanks a lot Yigit !
    You really rock guys :-)
    Best regards
    Blaise

    #803955

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘I just created a Child theme’ is closed to new replies.