I wanted to update the theme of this website and then make some small tweaks afterwards. To make these changes, I created a “child theme.” Making a “child theme” allows me:
- Make changes to the look/feel/functionality of this website without changing the core code of the theme.
- Track and document those changes.
- Allow me to upgrade without problems in the future.
- Learn more about wordpress theme and file structure
Information: http://codex.wordpress.org/Child_Themes
Essentially, I created a new folder in my /themes folder with two files.
style.css
/*----------------------------------------------------------- Theme Name: Adapt Child Theme URI: http://www.wpexplorer.com/ Description: Free responsive portfolio/blog theme Author: WPExplorer Author URI: http://themeforest.net/user/WPExplorer?ref=wpexplorer Template: wpex-adapt Version: 2.11 License: GNU General Public License version 3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html --------------------------------------------------------------- /* CSS has been minified to speed things up /* If you need to make edits use a child theme - as you should! --------------------------------------------------------------*/ /* =Theme customization starts here -------------------------------------------------------------- */
functions.php
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
function enqueue_parent_theme_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
These files are linked to the main theme and are read afterward. I can make any stylistic changes to the new style.css file and they will be implemented after the main stylesheet. All in all, this was a pretty smooth process and am happy to be moving forward on a better path!


