Wordpress child theme - functions.php copy - cannot "redeclare" -
I am using starkers with a child theme (starkers-child).
I need to edit Functions.php to declare a menu, so I have functions.
I have an error now:
Starkers_script_enqueuer () Can not be redeclared (C: \ wamp \ www \ redlaw \ wp-content \ themes \ starkers-child \ functions.php: 65) in C: \ wamp \ www \ I believe that This line is caused by: function starkers_script_enqueuer () {redhat / wp-content / themes / starkers-master \ functions.php
I can see why he Function has already said, so he could not call the child again.
But if I do not give this line to the master then keep a clean master and aim to keep a child subject?
Full Functions. PHP here (unpublished, as it appears in Master Theme)
Forgive me, me There is not enough representative to comment only
Function of a child theme. Php has been loaded additional than the original theme. So you do not really need to copy and paste the code. Everyone says about wrapping it in any , if (function_exists (function)) is optional, but one best practice because it is less error prone anyway!
This codex is from:
Unlike style.css, the functions.php of a child theme does not override its equivalent, rather than the parent, it The parents are loaded extra in addition to the tasks. Php. (Specifically, this parent is loaded just before the file.)
Comments
Post a Comment