Skip to main content

Step 1: define the custom region in your theme's .info file

The .info file for your Drupal 7 theme will be located within the root of the theme's main folder. e.g. bootstap subtheme's .info theme file is located at:/themes/bootstrap_subtheme/bootstrap_subtheme.info

Open up your theme's .info file and you should see some regions like this:

regions[navigation]     = 'Navigation'
regions[header]         = 'Top Bar'
regions[highlighted]    = 'Highlighted'
regions[help]           = 'Help'
regions[content]        = 'Content'
regions[sidebar_first]  = 'Primary'
regions[sidebar_second] = 'Secondary'
regions[footer]         = 'Footer'

to add a new region just type in a new one in bootstrap_subthemel.info file.

regions[featured] = featured

Step 2: print out your new region in page.tpl.php file:

<?php if ($page['featured']): ?>
  <div class="featured">
    <?php print render($page['featured']); ?>
  </div> <!-- /.featured -->
<?php endif; ?>
Tags