O'Reilly logo

Drupal 7 Themes by Ric Shreves

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

Creating a new sub-theme

The steps involved in creating a new sub-theme are detailed as follows, but in a nutshell, it works like this:

  1. Make a copy of the theme directory (and its contents).
  2. Rename the directory.
  3. Delete the files you don't need.
  4. Update the theme name inside the files you want to keep.
  5. Create a new stylesheet.
  6. Update the .info file.

So, let's get started.

Create a copy of the base theme

Access your Drupal installation on your server, and then make a copy of the Bartik theme directory (located at /themes/bartik).

Create the sub-theme in a new directory

Paste the copy of the directory containing the Bartik files into the /sites/all/themes directory and rename it to reflect our new theme's name: jeanb. So you should now have a new directory ...

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