The Shoptimizer Child Theme is a free child theme designed to help make it easy to preserve your theme customizations in an upgrade friendly manner.
Should I use the Shoptimizer Child theme?
If you’re making heavy modifications to the core Shoptimizer theme then yes, we’d recommend doing so. You can download a child theme for Shoptimizer here.
This child theme will work with any version of Shoptimizer. You don’t need to update it if the parent theme is updated!
If you are using the child theme in an RTL language
You will need to add this code to your child theme’s functions.php file.
1 2 3 4 5 6 7 |
function shoptimizer_child_enqueue_rtl() { $parent_base_dir = 'shoptimizer'; if ( is_rtl() ) { wp_enqueue_style( 'shoptimizer-rtl', get_template_directory_uri() . '/rtl.css', array(), wp_get_theme( $parent_base_dir ) ? wp_get_theme( $parent_base_dir )->get( 'Version' ) : '' ); } } add_action( 'wp_enqueue_scripts', 'shoptimizer_child_enqueue_rtl', 999 ); |
Customizer settings
A child theme is treated by WordPress as a completely separate entity. So your customizer settings are not carried over when you activate one.
This is easy to solve with the Customizer Export/Import plugin. Upon installing the plugin you’ll see a new option in the customizer to import and export settings.
If you only need to make minor CSS tweaks
If however, you’re making just small CSS adjustments, these can go into Appearance > Customize > Additional CSS
.
Custom functions
If you need something simple for custom functions or javascript we recommend using the Code Snippets plugin.