Home Forums Weaver Xtreme Theme Child Theme Steps Reply To: Child Theme Steps


This is confusing for someone who hasn’t much experience doing this.

I need to add some functionality to the site, but obviously do not want to add to the theme functions.php because it will get overwritten the next time there’s a theme update.

I found the weaverx-child-demo folder inside the public_html>
wp-content>themes>weaver-xtreme folder. In the demo folder are 4 files:

  1. functions.php – which I took out the example code to change BG color and added mine. See below.
  2. Notes.txt – which I’ve left alone.
  3. screenshot.png – which I’ve made my own
  4. styles.css – which I changed only to reflect the name of the new child theme.

I then copied the entire folder which contains the 4 files into the themes folder. Then I went to appearance > themes and selected that theme. The functionality that I wanted was great, but my header was missing and a lot of things were strange on the site.

I reverted back to the parent theme and put the child folder back into the themes>weaver-xtreme folder.

Here is the child functions.php

if ( ! defined( 'ABSPATH' ) ) {
} // Exit if accessed directly
/* This is the main function.php override file - it controls most of the stuff happening with the theme */

/* Anything you need to actively do, put here. This is the first code that will get run whenever the
  child theme is activated and used. This example just re-defines a function, but you could do anything.

$tsml_columns = array(
    'region' => 'Region',
    'time' => 'Time',
    'distance' => 'Distance',
    'name' => 'Name',
    'location' => 'Location',
    'address' => 'Address',
    'types' => 'Types'