FXT Child Theme
A child theme allows you to customize the FXT theme without losing your changes when the parent theme is updated.
What is a Child Theme?
A child theme inherits all the functionality and styling of the parent theme (FXT) while allowing you to make custom modifications that won't be lost during theme updates.
Benefits of Using a Child Theme
- Preserve Customizations: Your custom code won't be overwritten by theme updates
- Safe Updates: You can update the parent theme without losing changes
- Easy Maintenance: Keep customizations separate from the parent theme
- Development Best Practice: Recommended approach for theme customization
Creating a Child Theme
Method 1: Download a Child Theme
You can download a child theme for the FXT theme in your DinoMatic account.
Method 2: Manual Creation
-
Create Child Theme Directory
- Navigate to your WordPress themes directory:
/wp-content/themes/ - Create a new folder named
fxt-child
- Navigate to your WordPress themes directory:
-
Create style.css File
- Create a
style.cssfile in thefxt-childfolder - Add the following header information:
- Create a
/*
Theme Name: FXT Child
Description: Child theme for FXT
Author: Your Name
Template: fxt
Version: 1.0.0
*/
/* Add your custom styles below */
- Create functions.php File
- Create a
functions.phpfile in thefxt-childfolder - Add the following code:
- Create a
<?php
// Enqueue parent theme stylesheet
add_action('wp_enqueue_scripts', function() {
wp_enqueue_style('fxt-style', get_template_directory_uri() . '/style.css');
});
And that's all. You can now activate your child theme.
Activating the Child Theme
- Go to Appearance → Themes in WordPress dashboard
- Find your FXT Child theme in the list
- Click Activate to switch to the child theme
- Your site will now use the child theme