View Categories

Using the Child Theme

Using Child Theme #

What is a child theme? #

A WordPress child theme inherits its functionality from a parent theme. Use a child theme when you want to customize Basil without losing your changes when the parent theme is updated.

You do not need a child theme if you do not plan to modify theme files or add custom CSS. Activating the parent Basil theme alone is fine for most sites.

For more background, see WordPress child themes: pros and cons.

Basil Child #

Basil includes Basil Child in your ThemeForest package (the basil-child folder). The child theme:

  • Loads the parent Basil stylesheet correctly.
  • Provides a safe place for custom CSS in style.css.
  • Supports optional customizer additions via customizer.php in the child theme directory (the parent loads this file automatically if present).

Activate the child theme #

  1. If basil-child is not already in wp-content/themes, upload the basil-child folder from your theme package to wp-content/themes (via FTP or your host file manager).
  2. In WordPress admin, go to Appearance → Themes.
  3. Activate Basil Child (not the parent Basil theme).

When customizing, work in the child theme so parent updates do not overwrite your changes.

Customizing CSS via the child theme #

After Basil Child is active:

  1. Go to Appearance → Theme File Editor.
  2. Under Select theme to edit, choose Basil Child.
  3. Select style.css and add your custom CSS below the theme header comment.
Basil Child theme editor

Basil Child already enqueues its stylesheet after the parent — you do not need to add enqueue code unless you have advanced requirements.

Next step #

Install Demo Content