Home › Forums › Plugins › WP Child Theme Generator › How to Implement a Child Theme
Tagged: child theme, Theme, travel-eye-pro, Wordpress
- This topic has 3 replies, 2 voices, and was last updated 6 years, 9 months ago by wensolutions.
-
AuthorPosts
-
February 15, 2018 at 7:55 am #66028Leon TanParticipant
Hi,
I’m having difficulty installing a child theme for ‘Travel Eye Pro’. Whenever I implement the child theme, it seems to invoke the free version of the theme. Most baffling instance of a child theme implementation I’ve ever seen.
Has anyone ever encountered this/know a work around?
Cheers
February 15, 2018 at 10:44 pm #66058wensolutionsKeymasterHello @leontan15,
When you create the child theme of either pro/free version it won’t have any effect on either of them.
Also when we checked the issue by creating the child theme of Pro version, free version remains unaffected.
So please once try by creating the child theme of Travel Eye Pro theme by using the plugin given below:
https://wordpress.org/plugins/wp-child-theme-generator/
Please remove the child theme that you have previously created.
Hope this helps.
If you have any confusion further, please let us know.
Best Regards!!
February 17, 2018 at 4:14 am #66143Leon TanParticipantHiya,
That’s a neat plugin, but unfortunately it yields the same results. The primary theme always activates the theme perfectly, but whenever a child theme is created and activated, then the theme returns to it’s demo state.
As you can see from our staging site, the child theme I implemented with your recommended plugin still displays the demo sites settings: http://ab7.f99.myftpupload.com/
Any advice?
Cheers
February 18, 2018 at 11:36 pm #66235wensolutionsKeymasterHello @leontan15,
Actually, the thing is the plugin will generate the child theme of the parent theme will not tranfer the customizer setting that you have made in your original parent theme.
Not only with this plugin even if you create the child theme maually, you need to renter the setting in customizer of the child theme.
However, we do have the custom code which will import the parent theme customizer setting to the child theme.
So please add below given block of code to your child themes functions.php file which you have created.
function travel_eye_pro_child_customizer_options_import() { if ( get_stylesheet() !== get_template() ) { add_filter( 'pre_update_option_theme_mods_' . get_stylesheet(), function ( $value, $old_value ) { update_option( 'theme_mods_' . get_template(), $value ); return $old_value; // prevent update to child theme mods }, 10, 2 ); add_filter( 'pre_option_theme_mods_' . get_stylesheet(), function ( $default ) { return get_option( 'theme_mods_' . get_template(), $default ); } ); } } add_action('init', 'travel_eye_pro_child_customizer_options_import');
Hope this helps.
Best Regards!!
-
AuthorPosts
- You must be logged in to reply to this topic.