How To Create A Child Theme in WordPress

A WordPress Theme is a collection of files that produce the graphical interface for a wordpress website. You can find plenty of free or premium themes on internet. A good premium theme providers will aggressively

  • Update their themes with new features and functionality
  • Add more security features or bug Fixes
  • Update any browser compatibility issue
  • Keep up with the latest WordPress enhancements.

Whenever a new version of your WordPress theme is released, WordPress dashboard will notify you to update your theme to the latest version. WordPress experts always recommend you to update yo themes to your theme to latest version.

But when you update your theme, you’ll lose all the tweaks you made to it. How can you update a WordPress Theme without losing customization? WordPress is providing an easy mechanism to solve this issue. It is parent theme child themes combination.

What is a Parent Theme?
A parent theme is a complete theme which includes all of the required WordPress template files. Any theme in your /wp-content/themes/ folder is considered as parent theme.
What is a Child Theme?
A child theme is simply a theme that inherits the functionality and looks of another theme – the parent.

How to Create a Child Theme

A child theme consists of at least one directory with minimum two files (style.css and functions.php) in it. In fact only one file ( style.css) is required in child theme. But functions.php is necessary to enqueue styles correctly.

  1. Step1. Create a child theme folder:

    First, create a new folder in your themes directory, located at wp-content/themes.The directory needs a name. It’s best practice to give a child theme the same name as the parent, but with -child appended to the end. For example, if you were making a child theme of twentyfourteen, then the directory would be named twentyfourteen-child.

  2. Step2. Create a stylesheet: style.css

    Next, you’ll need to create a stylesheet file named style.css, which will contain all of the CSS rules and declarations that control the look of your theme. Your stylesheet must contain the below required header comment at the very top of the file. This tells WordPress basic info about the theme, including the fact that it is a child theme with a particular parent.

  3. Step3. Create a functions.php file

    Your child theme’s functions.php file should start with a php opening tag and end with a php closing tag. In between, you can add your desired php code.

  4. Enqueue the parent and child theme stylesheets

    What if Child theme does not overwrite parent themes style.css
    Some times ever after adding css code to your child theme, you don’t see any changes to the site’s style.

    For this, you need to enqueue it and add the parent stylesheet to the childtheme. The correct method of enqueuing the parent theme stylesheet is to add a wp_enqueue_scripts action and use wp_enqueue_style() in your child theme’s functions.php.

    add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ );
    function enqueue_parent_theme_style() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );

How To Configure Akismet For WordPress Blog

Spam is a huge problem for every website. Spammers love WordPress sites. Spam comments are irritating, and your readers might lose faith in you. Spam comments can negatively impact your search engine rankings. Akismet is one of the best comment spam filtering service that blocks spam in comments automatically. It is free to use and is highly recommended.

In this post, I will share how to configure Akismet For wordPress blog.

  1. Activate Akismet Plugin

    Akismet comes pre-installed with wordpress installation. You need to activate it. Go to Plugins > Installed Plugins. Click on Activate link next to Akismet Plugin

  2. Enter API key

    After activating Akismet, it will require an API key. If you already have a key enter and proceed.If you do not have a key, you can get it for FREE. Click on “Get your key”, you will be directed to Akismet’s website.

  3. When you click on “Get your key”, you will be directed to Akismet’s website. At first, you need to sign up for Akismet with If you already own a account, just login with your account. Otherwise, you have to create a new account. Just enter your Email address, username & password and click on “Sign Up” button.
  4. On the next page, select the basic plan to generate a free Akismet API key.
  5. On the next page, move the slider all the way to the left under the column which says “What is Akismet worth to you?” And click on “Continue”
  6. On the next page, click on the eye icon to get the free Akismet API key. Your Akismet API key will be sent to your email address too.
  7. Add this Akismet API key onto your Akismet configuration page.(step2)

  8. Configure Akismet Settings

    That’s it. You are done!