Use Child Theme: Add child theme support to any WordPress theme
What problem does this solve?
If you make changes to a theme, those changes will be lost when the theme is updated. With a child theme, your changes are kept separate, so the parent theme can be safely updated.
How it works
- If a child theme is not active, the user will see a WP notice with an "Activate" link on the Theme Editor screen
- When clicked, a child theme is created (if needed) and enabled
If you're a theme developer, include
use-child-theme.php in your theme, then add this code into functions.php:
require_once( trailingslashit( get_template_directory() ) . 'use-child-theme.php' );
- Code cleanup
- Create a child theme (if needed) only when user clicks "Activate"
- Hide notice for 24 hours when dismissed
- Support .gif and .jpeg screenshots
- Initial release