Create herder & footer pages and include in Drupal 7


  1. You will create two files header.php and footer.php.
  2. Create a folder “include” in your theme directory.
  3. Suppose that your theme directory is “aviweb” sites/all/themes/aviweb. Put header.php and footer.php file in “sites/all/themes/aviweb/include” theme folder.
  4. By using html and php you can write code in header.php and footer.php.
  5. Now you can include both files in page.tpl.php in header area and footer area like PHP.

<?php include_once($theme_path.’/include/header.php’); ?>

<?php include_once($theme_path.’/include/footer.php’); ?>

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s