Using a child theme
A child theme is a small theme that runs on top of your Themeasy theme. It holds your own code,
and theme updates never touch it. This guide uses Prio as the example; for your theme, replace
prio with its folder name (the name of the theme zip, without the version).
When you need one
A theme update replaces the theme's whole folder, so anything you edit inside it is lost at the next update. Use a child theme when you want to:
- add your own PHP: functions, hooks or filters;
- keep custom CSS in a file of its own;
- change one of the theme's template files.
You don't need a child theme for everything else, which stays in your database and survives every update:
- colors, fonts and spacing: set them in Themeasy → Settings and in Elementor's Site Settings;
- page layouts and your header and footer: edit them in Elementor;
- a few lines of CSS or JavaScript: Themeasy → Settings → Custom Code takes them. See Custom Code.
Get the child theme
Bought on ThemeForest: the main file you download from ThemeForest (All files & documentation) holds the child theme next to the theme itself:
prio-v{version}.zip the theme
prio-child.zip the child theme
Plugins/themeasy-v{version}.zip
Documentation/
Licensing/
prio-child.zip holds three files: a style.css for your CSS, a functions.php for your PHP and
the theme's screenshot.
Bought on themeasy.co: your download from the Themeasy Hub is the theme zip only, with no child theme. Make one yourself in a minute, as shown in make the child theme yourself.
Install it
The child theme needs its parent: install the theme first, then the child, and activate the child.
- Install the theme as usual: go to Appearance → Themes → Add Theme → Upload Theme and upload
prio-v{version}.zip. See installing the Themeasy theme. - In the same place, upload
prio-child.zipand click Install Now. WordPress confirms that the parent theme is installed. - Click Activate under Prio Child.
Keep the parent theme installed: the child runs on it, and the parent is what receives the theme updates. If WordPress answers "The parent theme could not be found", install the theme first, then upload the child again.
After you activate the child, the setup wizard opens once more. It works the same under the child, and it opens on the first step you haven't finished, so a site you have already set up lands on Setup Complete.
Tip
The best moment to switch is right after installing, before you start customizing. Switching later works too: see what carries over below.
What carries over when you switch
Almost everything lives in your database, not in the theme, so it stays the same under the child theme:
| What | Under the child theme |
|---|---|
| Pages, posts and the imported demo | Your content and your Elementor designs. |
| Themeasy → Settings and Elementor's Site Settings | Your colors, fonts and the other design settings. |
| Global Sections | Your header, footer and other sections, with their display rules. |
| Menus | WordPress also copies their menu locations the first time you activate the child. |
| The site logo | It stays in place. |
| Your license | The theme stays licensed: the wizard shows License Status: Active. |
| The setup wizard | Still at Appearance → Theme Setup: re-import the demo or manage your license from there. |
| The theme's own templates | They stay in the Themeasy Library with the Theme badge. |
One thing does not carry over: Additional CSS in Appearance → Customize, which
WordPress saves per theme. If you wrote CSS there, copy it to the child's style.css (or to
Themeasy → Settings → Custom Code) before you switch.
Where your code goes
| Your code | Where it goes |
|---|---|
| CSS | The child's style.css, below the line "Your custom CSS goes below this line." The theme loads this file after its own styles, so your rule wins over the theme's rule of the same specificity. There is nothing to enqueue. |
| PHP | The child's functions.php. It runs before the theme's own functions.php. |
| JavaScript | A file js/custom.js that you create in the child's folder. The child's functions.php loads it on every page once the file exists. |
| A template file | Copy the file from the prio folder into the child's folder, at the same path (for example template-parts/content/...), and edit the copy. WordPress uses the child's copy first. |
To edit the files, use your hosting's file manager or an FTP/SFTP client: the child theme is in
/wp-content/themes/prio-child/.
Warning
Keep design changes out of CSS where you can. A color or font set in Themeasy → Settings or Elementor's Site Settings reaches every page and widget; the same change in CSS does not.
Make the child theme yourself
A copy bought on themeasy.co has no child theme in its download, so make one from two files. It works exactly like the one in the ThemeForest download.
- On your computer, create a folder named
prio-child. - In it, create a file
style.csswith the content below. - Next to it, create a file
functions.phpwith the content below. - Optional: copy
screenshot.pngfrom the theme zip into the folder, so the child shows a thumbnail under Appearance → Themes. - Zip the folder, so that the zip holds the
prio-childfolder, then install it as shown in install it.
style.css: the Template line must be the parent theme's folder name, exactly.
/*
* Theme Name: Prio Child
* Template: prio
* Version: 1.0.0
*/
/* Your custom CSS goes below this line. */
functions.php: this one also loads js/custom.js once you create it, like the ThemeForest
child does.
<?php
defined( 'ABSPATH' ) || exit;
// Loads js/custom.js of this child theme, when the file exists.
function prio_child_enqueue_scripts(): void {
$path = get_stylesheet_directory() . '/js/custom.js';
if ( ! file_exists( $path ) ) {
return;
}
wp_enqueue_script(
'prio-child',
get_stylesheet_directory_uri() . '/js/custom.js',
[],
(string) filemtime( $path ),
true
);
}
add_action( 'wp_enqueue_scripts', 'prio_child_enqueue_scripts' );
// Your custom PHP goes below this line.
No FTP? You can also upload the prio-child folder to /wp-content/themes/ with your hosting's
file manager, then activate Prio Child under Appearance → Themes.
Where to go next
Was this article helpful?