-
AuthorPosts
-
June 5, 2017 at 1:49 pm #803917
Hi,
I just created a Child theme of Enfold.
I did it with the help ofIt 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…June 5, 2017 at 2:03 pm #803920Hey 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.
June 5, 2017 at 2:09 pm #803924Hi 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 570June 5, 2017 at 2:27 pm #803937Hi!
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!
YigitJune 5, 2017 at 2:41 pm #803942Hi 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 ?June 5, 2017 at 2:49 pm #803945Hey!
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,
YigitJune 5, 2017 at 2:52 pm #803950Wonderful !
Still another detail ;-)
Is it possible to remove the link attached to the date and time of the comment ?June 5, 2017 at 2:55 pm #803951Hey!
Yes, please add following code to Quick CSS as well
.comment-meta.commentmetadata { pointer-events: none; }
Regards,
YigitJune 5, 2017 at 2:57 pm #803954Thanks a lot Yigit !
You really rock guys :-)
Best regards
BlaiseJune 5, 2017 at 3:01 pm #803955Hi,
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 -
AuthorPosts
- The topic ‘I just created a Child theme’ is closed to new replies.