How to upgrade from Hestia to Hestia PRO when using your own child themes

If you are using your own custom created child theme for Hestia and want to upgrade to Hestia PRO, you will have to make some changes in order to make sure all the options are migrated to the PRO version.

Here is how you can do that:

1. First, make sure you created the child theme for Hestia using this guide. For this example, the child theme for Hestia will be called Hestia Child, with the folder hestia-child.

2. Second, create a child theme for Hestia PRO too, using the same doc. For this example, the child theme for Hestia PRO will be called Hestia Pro Child, with the folder hestia-pro-child.

3. Third, in the functions.php file of Hestia Pro Child child theme add the following code:

add_action( 'after_switch_theme', 'hestia_pro_child_get_lite_options' );
/**
 * Import lite options
 */
function hestia_pro_child_get_lite_options() {
	$hestia_mods = get_option( 'theme_mods_hestia-child' );
	if ( ! empty( $hestia_mods ) ) {
		
		$hestia_big_title_title   = '';
		$hestia_big_title_text        = '';
		$hestia_big_title_button_text = '';
		$hestia_big_title_button_link = '';
		$hestia_big_title_background  = '';
		
		foreach ( $hestia_mods as $hestia_mod_k => $hestia_mod_v ) {
			
			if ( $hestia_mod_k == 'hestia_big_title_title' ) {
				$hestia_big_title_title = $hestia_mod_v;
			}
			if ( $hestia_mod_k == 'hestia_big_title_text' ) {
				$hestia_big_title_text = $hestia_mod_v;
			}
			if ( $hestia_mod_k == 'hestia_big_title_button_text' ) {
				$hestia_big_title_button_text = $hestia_mod_v;
			}
			if ( $hestia_mod_k == 'hestia_big_title_button_link' ) {
				$hestia_big_title_button_link = $hestia_mod_v;
			}
			if ( $hestia_mod_k == 'hestia_big_title_background' ) {
				$hestia_big_title_background = $hestia_mod_v;
			}

			set_theme_mod( $hestia_mod_k, $hestia_mod_v );
		}
		
		if ( ! empty( $hestia_big_title_title ) || ! empty( $hestia_big_title_text ) || ! empty( $hestia_big_title_button_text ) || ! empty( $hestia_big_title_button_link ) || ! empty( $hestia_big_title_background ) ) {
			$tmp = array(
				array(
					'image_url' => $hestia_big_title_background,
					'title'     => $hestia_big_title_title,
					'subtitle'  => $hestia_big_title_text,
					'text'      => $hestia_big_title_button_text,
					'link'      => $hestia_big_title_button_link,
					'id'        => 'customizer_repeater_56d7ea7f40a56',
					'color'     => '#e91e63',
				)
			);
			if ( ! empty($tmp) ) {
				set_theme_mod( 'hestia_slider_content', json_encode( $tmp ) );
			}
		}
	}
}

Important note:

The most important thing here is to make sure the child themes folder names match the code. If you would use a different folder name for Hestia's child theme you would need to update this line of the code:

$hestia_mods = get_option( 'theme_mods_hestia-child' );

That's it! Interested in Hestia Pro? Click here to see Hestia vs Hestia Pro

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us