Add class to page content output I have the following snippet in a theme's page.tpl.php:

&lt;div id="content-wrap" class="row"&gt;
          &lt;?php print render($title_prefix); ?&gt;
          &lt;?php if ($title): ?&gt;&lt;h1 class="page-title"&gt;&lt;?php print $title; ?&gt;&lt;/h1&gt;&lt;?php endif; ?&gt;
          &lt;?php print render($title_suffix); ?&gt;
          &lt;?php if (!empty($tabs['#primary'])): ?&gt;&lt;div class="tabs-wrapper clearfix"&gt;&lt;?php print render($tabs); ?&gt;&lt;/div&gt;&lt;?php endif; ?&gt;
          &lt;?php print render($page['help']); ?&gt;
          &lt;?php if ($action_links): ?&gt;&lt;ul class="action-links"&gt;&lt;?php print render($action_links); ?&gt;&lt;/ul&gt;&lt;?php endif; ?&gt;
          &lt;?php print "**59**". render($page['content'])."**88**"; ?&gt;
        &lt;/div&gt;


The starred numbers in the last line for debugging. The output of render($page['content']) is something like the follwoing:

&lt;div class="region region-content"&gt;
  &lt;div id="block-system-main" class="block block-system"&gt;
.....


What I need to perform is programmatically change or add class name to &lt;div class="region region-content"&gt;
You can do that in a module/theme by adding a region preprocess hook:

function MYTHEME_preprocess_region(&amp;$vars) {
  if ($vars['region'] == 'content') {
    $vars['classes_array'][] = 'foo';
  }
}