O'Reilly logo

Drupal 8 Development Beginner's Guide - Second Edition by Kurt Madel, Malabya Tewari, Rakesh James, Krishna Kanth, Edward Crompton, Samuel Keen, Tassos Koutlas, Neeraj Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a sub-theme

What we need to do is set up a theme to inherit the benefits we get from our chosen theme, that we can then adjust to suit our needs. This is called a sub-theme. Let's get started, using Bartik as the parent theme.

Back in PhpStorm, in the root directory of your project, navigate to the themes directory. Right now this directory is empty apart from a README file. We'll first create a directory to place our sub-theme in. It is good practice to place your own themes in a folder named custom, and any contributed themes in a sub folder named contrib (more on contributed themes later). Inside the newly created custom folder, we'll begin creating our sub-theme. We need to follow a few naming rules: it must start ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required