Quantcast
Channel: Yudiz Solutions Ltd.
Viewing all articles
Browse latest Browse all 595

WordPress Child Theme: How to make?

$
0
0

Introduction of WordPress child theme

WordPress child theme we create using parent theme. If we require any customisation on theme as per our requirement, we create a child theme.

How to create a child theme?

First step to install a WordPress. create a database for the project. After that give meaning full name of the project.

image00

After that we can choose any theme for our project. Put wp-content under theme folder. Now set the theme for our project. Once all these steps are completed, we move further for our main part that is a child theme.

image03

Now we create a child theme for that we will follow some steps. We copy the parent theme after that give a name for child theme here project name is intraday so child theme is same and related to the parent theme so give a meaningful name for it. I have given the name as cuda-child.

image04

Now in a child theme which file we required only that file we will put on child theme. Only three files we will need for child theme folder.

  1. style.css
  2. functions.php
  3. screenshot.png

image05

If we need to change any structure and we need for customisation of this project so we can easily do that using a child theme. If we required to change n header or footer file, we can
copy that file and pass to a child theme and now what ever changes is required in header or footer part then we make changes on child theme only no need to change parent theme.

We see here on screenshot as:

  1. page-fullwidth.php
  2. header.php
  3. footer.php

image01

We create a child theme so that we require to activate a child theme. Here is a screenshot for that:

image02

One important thing we do is that we import a style.css of parent theme on a child theme css. Like this:

@import url(“parent-theme-name/style.css”);

Create a CSS File.

Now the required things for child theme’s CSS file are:

  1. Theme Name
  2. Theme URI
  3. Description
  4. Author
  5. Author URI
  6. Template
  7. Version
  8. Tags
  9. Text DomainFile

When to use Child Themes?

Child themes can be used in different scenarios. We mostly use child theme to customise and modify a theme.

Advantages & Disadvantages of a Child Theme

Advantages

  1. We can easily customise a theme.
  2. All styles can be written on child theme css.
  3. We can do all types of changes on child theme.
  4. Child theme inherits parent theme style, functions file template and all features.
  5. We can easily update wordpress theme.
  6. This helps to increase the speed of development and reduces time to complete task.
  7. It is very flexible for customisation.
  8. If we forget any functionality or a code then parent theme is always available for making any correction.
  9. For any fallback, no need for recoding.
  10. Makes it Easy to Modify Popular Themes.

Disadvantage

  • Disadvantage of child theme is that we require time to understand a parent theme.

Conclusion

Now a days for any wordpress project we include a child theme. It is very easy to customise. So that we can fulfill our requirement easily.


Viewing all articles
Browse latest Browse all 595

Trending Articles