Book Image

Learning less.js

Book Image

Learning less.js

Overview of this book

Table of Contents (22 chapters)
Learning Less.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a basic child theme


Hold on, preparing our theme?

Yes, you read correctly—preparing our theme. While WordPress does come with three themes available for use out of the box, it is not good practice to modify the source files directly.

Modifying the source files means that your theme will break if an update is released for it (and yes, WordPress does release updates to its themes). We can get around this by creating a child theme, which sits in the same theme folder, but is set to inherit the base files of its parent theme.

What this means is that we can retain the original system files for the parent theme, but use new styles created in the child theme to override existing styles. We will make good use of this principle later in this chapter, when we start to write new Less code.

For now, let's quickly run through creating our new child theme:

  1. Navigate to wp-content | themes; here, you will see a folder called twentyfourteen:

  2. Create a copy of this folder, but rename it twentyfourteen-child...