Here is the problem:
El Greco theme (AliDropship original plugin) stores ALL theme settings, including scripts and styles (not recommended), in the database.
So the best and fastest (but not ideal) solution I found is copying the option values from the parent theme to the child theme.
You can do it manually, opening your database, or using the function below I've created.
PHP:
/**
* COPY PARENT THEME SETTINGS
*
* Beware!
* The parente theme settings will be copied to child settings
* every time you activate the child theme.
* If you want to copy the parent theme settings only once,
* delete this code after you child theme is ready.
*
*/
function child_copy_parent_theme_options() {
wp_cache_delete('alloptions', 'options');
$wp_theme = wp_get_theme();
$child_name = $wp_theme->Name;
$parent_name = $wp_theme->parent()->Name;
$child_slug = get_stylesheet();
$parent_slug = get_template();
// get parent theme options
$parent_options = get_option("cz_{$parent_name}");
$parent_mods = get_option("theme_mods_{$parent_slug}");
// update child theme options
update_option("cz_{$child_name}", $parent_options);
update_option("theme_mods_{$child_slug}", $parent_mods);
}
add_action('after_switch_theme', 'child_copy_parent_theme_options');
Put it on your child theme
functions.php file, and activate your child theme. It will automatically copy all parent theme settings and styles to your child theme.
(As usual, take precautions to ensure that your website files and database are safeguarded. Make a backup before any changes are applied.)
Bear in mind any changes to your child theme settings are NOT replicated automatically to your parent theme. Parent and child theme settings and styles are NOT synchronized.
If you want to deactivate your child theme in the future, you will probably need to copy the settings back to your parent theme.
If you wish to test another child theme, you will probably need to modify the code above to copy the settings and styles from one child theme to another.
Why do I need all this hard work to create a child theme?
Truth, you wouldn't need it, but the "El Greco" theme for AliDropship original plugin (I don't know about other themes) does NOT provide the right facilities to create a child theme.
ALL theme settings (including scripts and styles) are stored in the database, and this is not the best WordPress practice.
First, child themes won't be able to enqueue scripts and styles as usual.
Second, as WordPress loads all options on every page load by default, if the data in autoloaded options is considerably large, it will slow down autoload and consume as much memory.
Final consideration
As a premium theme, it surprises me El Greco is NOT "child theme friendly".
I hope the AliDropship team take advantage of my contribution and, at least, publish documentation about creating child themes for El Greco and other AliDropship original themes, if necessary.
PS: If anyone needs it, here is the child theme
style.css file (as simple as possible).
CSS:
/*
Theme Name: Your Child Theme Name
Template: el-greco
*/