I am creating a child theme for the first time.
I have created style.css
(and imported parent theme’s style.css
in it) and also some new files and additional functions in functions.php
.
Now, I have copied index.php
from parent theme to child theme
However still some of the parent theme’s admin options are not being picked up in child theme. Specifically, I get a fatal PHP error that a function is not recognized when I load index.php
(after setting child theme as the theme to be used by WP).
- Do I even have to copy
index.php
from parent to child? - If I want basically parent’s
index.php
to be loaded then do I leave child theme’s index.php blank? Or do I import the parent’sindex.php
(in the child theme’sindex.php
)? - There are some admin options added for the child theme (in addition to those in parent theme) – now do I set the admin options (of parent theme) by configuring the parent theme in WP admin?
- Is it possible to show the admin options pertaining to the parent theme within the child theme’s admin options? So that I need not configure the parent theme’s options separately from those in the child theme? How do I do this? Also do you recommend this approach (point 4) or the previous approach (separately configuring parent theme’s admin options within the parent theme itself (point 3)?
Using an
index.php
in your Child Theme is optional; but having one will overwrite your Parent’sindex.php
. Using a blankindex.php
will also show you a blank page.You can copy the
index.php
from your Parent’s Theme to make it look like the Parent’s Theme, but there’s no need to do it. If there’s noindex.php
within your Child Theme theindex.php
of the Parent’s Theme will be loaded.There is no difference if you’re activating a Child Theme or a ‘Normal’ Theme. Widgets for example are supposed to move to the ‘Inactive Widgets’ section, so you’ll probably have do do some detail configuration.
Perhaps there are hardcoded links within Plugins or Theme Options. Here are some links that’ll hopefully help you: