• Home
  • Quick Start
    • Color Schemes
  • Documentation
    • Shortcodes
    • JaW Hooks
    • Screenshots of ThemeOptions
  • Tutorials
  • Forum
  • Contact
Log In

  • Home
  • Quick Start
    • Color Schemes
  • Documentation
    • Shortcodes
    • JaW Hooks
    • Screenshots of ThemeOptions
  • Tutorials
  • Forum
  • Contact

Homefor DevelopersHow to create a Child Theme
wordpress child theme

How to create a Child Theme

Child theme, is the best way how to do some HTML or PHP customization by your wish. With child theme you’ll be still able to update main theme without loosing any of your customisation.

  • admin
  • Posted in for Developers
0
SHARES
SHARESHARESHARESHARE
SHARESHARE

Here are a few reasons, why use a Child Theme

  • If you modify an existing theme and it is updated, your changes will be lost. With a child theme, you can update the parent theme (which might be important for security or functionality) and still keep your changes.
  • It can speed up development time.
  • It’s a great way to get started if you are just learning WordPress theme development

How to create a WordPress Child Theme

It’s really easy to create a child theme. So let’s do it.

  1. Create a Child Theme
    Open folder main_files (downloaded from themeforest) and unzip gdaynews-child.zip to ../wp-content/themes/ folder.

    wordpress-child-heme
    You should see something like this in your ../wp-content/themes/ folder.wordpress-child-theme-folder-structure
  2. Create important files within Child Theme folder
    You will have to create some files within it’s folde called functions.php and style.css. Each of these files have a different purpose.wordpress-child-theme-folder-files-structure
  3. File functions.php
    After you have successfully created file functions.php, you are able to overwrite main theme’s functions.php now.child-theme-functions HINT – for PHP customization, use a Child Theme 
  4.  File style.css
    After you have successfully created file style.css, you are able to overwrite main theme’s template.css now. But we recommend doing it via our theme options in wordpress administration.child-theme-styleHINT – for some minor CSS changes, use Theme Options
  5. That’s It 🙂
    So the last step you will have to do is activating a Child Theme in wordpress administration Appearance->Themes.
    activate-child-theme

How to overwrite main theme’s files

If you want to overwrite some files from main theme, e.g.

../themes/gdaynews/templates/custom-posts/single-gallery.php

you will have to create the same structure in child theme

../themes/gdaynews-child/templates/custom-posts/single-gallery.php

Now you are able to overwrite file single-gallery.php from main theme 🙂
Same step for plugins.

For more information, please follow this url

Biography

Child Themes. In: [online]. Available from: http://codex.wordpress.org/Child_Themes#Why_use_a_Child_Theme.3F

If you have some thoughts or ideas, please leave us a feedback 🙂

Related Posts

wphooks
0 comments
JaW Hooks

Actions jaw_before_usermanagement and jaw_after_usermanagement

wphooks
0 comments
JaW Hooks

Filter jaw_get_template_part

wphooks
0 comments
JaW Hooks

Action jaw_postbox_X

css3

How to edit custom stylesheets

wp-multi-language

How to Set a Theme Locale

Related Posts

wphooks
0 comments
JaW Hooks

Actions jaw_before_usermanagement and jaw_after_usermanagement

wphooks
0 comments
JaW Hooks

Filter jaw_get_template_part

wphooks
0 comments
JaW Hooks

Action jaw_postbox_X

wphooks
0 comments
JaW Hooks

Filter jaw_meta_categories

Tags

  • child theme
  • custom
  • developers
  • Was this Helpful ?
  • yes   no
Copyright © 2016 jawtemplates - WordPress Design Studio Disable responsivity