1. Home
  2. Getting Started
  3. Child Theme

Child Theme

If you want to make edits to the theme without loosing them upon updates, you can create a child theme.

First, go to your themes directory, which is the folder where all your themes are present, and create a new folder.Let’s call it:

wyzi-business-finder-child




Inside this folder, create 2 files;

Call the first one: style.css and paste the following into it:
/*
Theme Name: WYZI Business Finder Child
Theme URI: http://wyzi.wztechno.com
Author: WzTechno
Author URI: http://www.wztechno.com/
Template: wyzi-business-finder
Description: Social Business Finder Theme by WzTechno
Text Domain: wyzi-business-finder-child
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, left-sidebar, right-sidebar, custom-background, custom-colors, custom-menu, featured-images, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready
Version: 1.3.0
*/

Save and close.

Name the second one: functions.php, and paste the following into it:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}

Save and close, Done!



Now, if you navigate to your wordpress dashboard, go to appearances, you’ll find a new theme listed in the available themes under the name: WYZI Business Finder Child. Activate it, and you’ll notice zero changes to the site, but now, you are actually using the child theme as your template.

Was this article helpful to you? Yes No