Welcome to GPLDL - we are still beta - please report any bugs via the contact form.

GPLDLGPLDL
GPLDL
Download the most popular GPL licensed Premium WordPress Themes & Plugins and WooCommerce Extensions for FREE!
  • Blog
    • Blog Articles
    • Latest Updates & Additions
  • Repository
    • Full Repository
    • Premium WordPress Themes
    • Premium WordPress Plugins
    • Premium WooCommerce Extensions
    • Special Gifts for Premium Members
    • Tutorials
  • Forum
  • Free Membership
  • Donations
  • My GPLDL Account
  • Sign In
Menu back  

How to create a Child Theme for your WordPress Theme?

December 19, 2022

To create a child theme for a WordPress theme, follow these steps:

  1. Create a new folder in your WordPress theme directory and name it something like "child-theme."
  2. Inside the child theme folder, create a new file called "style.css." This will be the main stylesheet for your child theme.
  3. In the style.css file, add the following code at the top:

/* Theme Name: Child Theme Description: A child theme of [parent theme name] Template: [parent theme name] */

Replace "Child Theme" with the name of your child theme, and replace "[parent theme name]" with the name of the parent theme you are creating a child theme for.

  1. Add any custom styles to the style.css file that you want to override in the parent theme.
  2. Create a new file in the child theme folder called "functions.php." This file will allow you to add custom functions and hooks to your child theme.
  3. In the functions.php file, add the following code at the top:

<?php add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); function enqueue_parent_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } // Add any other custom functions or hooks below this line ?>

This code will load the parent theme's stylesheet and make it available to your child theme.

  1. Activate your child theme by going to the WordPress dashboard and navigating to Appearance > Themes. Your child theme should now be listed as an available theme to activate.
  2. Customize your child theme by adding custom styles, functions, and hooks as needed. Be sure to test your changes carefully to ensure that they do not conflict with the parent theme or cause any issues with your site.

Using a Child Theme with your current WordPress Theme allows you to make changes in your Child Theme's functions.php and style.css which will NOT be overwritten when you update your theme.

changesChild ThemecodecreateCSSCustomizefunctions.phphooksInstructionsoverwritePHPPremium ThemeSetupstyle.csstestthemetutorialUpdatewordpressWordPress Themewrite
Related posts
Some common use cases for the Gravity Forms WordPress Plugin
December 19, 2022
How to write your own WordPress Theme from scratch?
December 19, 2022
How to add Keywords and Meta Descriptions in WordPress to improve SEO?
December 18, 2022
Some Legal Implications of the GPL (GNU Public License)
December 17, 2022
How to manually update WordPress plugins & themes (via FTP)?
December 17, 2022
What is the GPL and why does it matter?
December 16, 2022
Search the Repository
We reward your Donations!
We need your Donation to maintain and grow the GPLDL WordPress Repository - and we reward your generosity with Premium Memberships allowing you to download even more files.

Learn more about donations & rewards...
News from our blog
  • Some common use cases for the Gravity Forms WordPress Plugin
    December 19, 2022
  • How to write your own WordPress Theme from scratch?
    December 19, 2022
  • How to create a Child Theme for your WordPress Theme?
    December 19, 2022
Latest Updates & Additions
  • GPLDL News: 144 Updates & Additions today – Download 2346 Premium WordPress items!
    January 29, 2023
  • GPLDL News: 124 Updates & Additions today – Download 2346 Premium WordPress items!
    January 22, 2023
  • GPLDL News: 109 Updates & Additions today – Download 2344 Premium WordPress items!
    January 15, 2023
Tags
check code Copyright distribution Download Drupal fork forked fsf FTP functions.php GNU Public License GPL Guide HowTo Instructions Legal license Magento manually nulled PHP Plugin Plugins Premium redistribution remove Rights Search Engine Optimization secure SEO serial step by step style.css Themes true tutorial Update usage Website WooCommerce wordpress WordPress Plugins WordPress Theme WordPress Themes
Welcome to GPLDL!
scr02We love innovation and we believe in free software!

That's why we strive to make the world's best Premium WordPress Themes & Plugins and WooCommerce Extensions & Themes available for everyone!

Find us on:

FacebookTwitterRssPinterestWebsite
Latest Blog Posts
  • Some common use cases for the Gravity Forms WordPress Plugin
    December 19, 2022
  • How to write your own WordPress Theme from scratch?
    December 19, 2022
  • How to create a Child Theme for your WordPress Theme?
    December 19, 2022
Latest Updates & Additions
  • GPLDL News: 144 Updates & Additions today – Download 2346 Premium WordPress items!
    January 29, 2023
  • GPLDL News: 124 Updates & Additions today – Download 2346 Premium WordPress items!
    January 22, 2023
  • GPLDL News: 109 Updates & Additions today – Download 2344 Premium WordPress items!
    January 15, 2023
About GPLDL
  • About GPLDL
  • Need Help?
  • F.A.Q.
  • Terms of Service
  • Privacy Policy
  • Contact
GPLDL - all Rights reserved.
  • About GPLDL
  • Need Help?
  • F.A.Q.
  • Terms of Service
  • Privacy Policy
  • Contact
  • Sign In
GPLDL Widget Menu