Part 5: Basic Drupal 7 theme from scratch.

Published on : April 27, 2026

Author:

Category: Drupal


Themes allow you to change the look and feel of your Drupal site. You can use themes contributed by others or create your own to share with the community. Contributed themes are not part of any official release and may not have optimized code/functionality for your purposes. You can also create a sub-theme of an existing theme. A sub-theme inherits a parent theme’s resources.

What we will be covering in this tutorial:

5.1   Create the folder structure
5.2   Create the .info file
5.3   Understanding Drupal template files
5.4   Create the page.tpl.php
5.5   Create your regions
5.6   Add variables for basic page elements
5.7   Build your CSS and JS
5.8   Create your screenshot

5.1: Create the folder structure:

First you need to create a folder for your new theme. This should go in sites/all/themes.
Drupal theme

  • Create a folder in the name ‘first_drupal’ into theme folder. And open it.
  • Now create two files named:
    • first_drupal.info (you must have same name for theme folder and info file)
    • template.php
  • Create three folder into theme folder
    • css
    • images
    • template
  • Open css folder and create a file named style.css
  • Open template folder and create a file named page.tpl.php