Tagged: child theme, functions.php, white screen of death
-
AuthorPosts
-
September 26, 2015 at 6:20 am #509356
Hello,
I am using a child theme for the Enfold theme. I am using the latest version of Enfold, and I am also using the Enfold Child theme provided by Kriesi.
The problem is every time I try to load functions.php in /enfold-child I get the white screen of death on front end and admin.
I copied and pasted the functions file exactly as it was in the enfold/functions.php.
I added the line: $avia_config[‘use_child_theme_functions_only’] = true; to the top of the file and still same blank white page.
Is there a special trick to get the functions.php to load and not cause the pages the white blank?
Please let me know ASAP, thank you.
September 26, 2015 at 12:41 pm #509480Hi!
Try enabling WP_DEBUG and chack if a message appears instead of the white screen.
Best regards,
JosueSeptember 29, 2015 at 4:59 am #510512Yes, the errors are in relation to the include and require statements in the functions.php file because those files are in the parent theme Enfold. Copying all of those files doesn’t not make sense. How can I just use the functions.php in the child theme without errors?
September 29, 2015 at 5:00 am #510513I really need to figure this out, please assist ASAP. Thank you.
September 29, 2015 at 6:50 am #510550Hi!
Can you please show us the errors that come up?
Thanks a lot for your time and patienceCheers!
BasilisSeptember 29, 2015 at 6:55 am #510553Notice: Undefined index: b1d02adf6 in /home6/tuf/public_html/wp-includes/rewrite.php on line 1
Warning: require_once(config-wpml/config.php) [function.require-once]: failed to open stream: No such file or directory in /home6/tuf/public_html/wp-content/themes/enfold-child/functions.php on line 36
Fatal error: require_once() [function.require]: Failed opening required ‘config-wpml/config.php’ (include_path=’.:/usr/lib64/php:/usr/share/pear’) in /home6/tuf/public_html/wp-content/themes/enfold-child/functions.php on line 36
September 29, 2015 at 9:25 am #510603Hi,
Could you please provide us with a temporary admin login so that we can take a closer look? You can post the details in the Private Content section of your reply.
Thanks,
RikardSeptember 29, 2015 at 1:46 pm #510727Sent private details.
September 29, 2015 at 6:44 pm #510929Any ideas as to what is wrong?
September 29, 2015 at 9:12 pm #510993Hi!
The problem is every time I try to load functions.php in /enfold-child I get the white screen of death on front end and admin.
I copied and pasted the functions file exactly as it was in the enfold/functions.php.You don’t need to do that, leave child functions.php empty.
Regards,
JosueSeptember 30, 2015 at 4:48 am #511095See reply :)
September 30, 2015 at 5:29 am #511102Hey!
Correct, add them to the child theme functions.php. Some Enfold native functions and classes are pluggable, meaning you can paste the whole code in the child theme functions.php and it will override the parent ones.
Regards,
JosueSeptember 30, 2015 at 5:33 am #511105Ok thanks for clarifying, do you have a list of the pluggable functions in functions.php?
September 30, 2015 at 9:08 am #511197Hi!
Look for anything that starts with:
if(!function_exists...
Note that if what you want to change is wrapped with
apply_filters
it would be more efficient to use a filter approach instead.References:
https://codex.wordpress.org/Function_Reference/apply_filters
https://codex.wordpress.org/Function_Reference/add_filterBest regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.