Switching to a Child Theme After You’ve Already Started Building Your Website

With more and more people discovering what a child theme is, it’s quite common that people find themselves wanting to do things right and switch to using a child theme to make their theme customizations after they’ve already started building a website.

However, this can be a scary thing for the first-timers dipping their toes in the water. When you activate a child theme, there are a few minor things that can sometimes happen with your site, that can seem not-so minor. My goal in this article is to address the most common issues people have when activating a child theme for the first time, and provide a simple solution for each.

And remember… You may have not have these issues!

1. Your site’s navigation menus are gone.

Issue

This can seem like a big issue at first glance, but it really isn’t. The theme you’re using has certain menu locations that you save your custom menus to under Appearance > Menus. WordPress saves these based on the current theme, and when you activate a child theme, this is technically a new theme.

Solution

Don’t worry; those menus and pages you spent hours building are not lost. Just go to Appearance > Menus > Manage Locations and re-apply your menus to their locations.

2. Your widgets are no longer setup right.

Issue

This is kind of a fluky issue with WordPress and will vary in different situations. Basically the gist is that when you activate your child theme (i.e. you’re switching to a new theme), your widgets sometimes get shifted around a bit into the incorrect widget areas.

Note: I’ve noticed that this quirk seems to happen less and less, with recent WordPress updates.
Solution

Go to Appearance > Widgets, and make sure all of your widgets are in the correct widget areas. You may need to spend a few minutes just dragging many of the widgets back to the correct widget areas.

If any of the widgets you setup previously are gone all together, check to make sure they aren’t in the “Inactive Widgets” section before deciding you need to add them again and re-configure their settings.

3. Your theme options are gone.

Issue

I find that this is probably the scariest issue for people. — They activate that child theme, and then see all of the theme’s default options on the frontend of their website.

Note: Because so many people get spooked by this, in 2016, we started implementing a modification directly into the sample child themes included with all themes. So, there’s a good chance, you’ll never experience this if you’re starting with a sample child theme included after that time.
Solution

Our theme options are saved to a unique ID based on the name of the current theme in your WordPress database. When you switch to the child theme, this ID has now changed. But don’t worry; it doesn’t mean the options are lost forever.

There’s an entire article here about this, if you’d like to check it out. The short version is just to copy the following into your child theme’s functions.php file, and your theme settings will magically re-appear!

function my_option_id( $option_id ) {
	$theme = wp_get_theme( get_template() ); // From parent theme
	return preg_replace('/W/', '', strtolower( $theme->get('Name') ) );
}
add_filter('themeblvd_option_id', 'my_option_id');